Client LuaCsForBarotrauma
SkillSettings.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Xml.Linq;
5 
6 namespace Barotrauma
7 {
9  {
11  public static SkillSettings Current => Prefabs.ActivePrefab;
12 
13  [Serialize(4.0f, IsPropertySaveable.Yes)]
14  public float SingleRoundSkillGainMultiplier { get; set; }
15 
16 
17  private float skillIncreasePerRepair;
18  [Serialize(5.0f, IsPropertySaveable.Yes)]
20  {
21  get { return skillIncreasePerRepair * GetCurrentSkillGainMultiplier(); }
22  set { skillIncreasePerRepair = value; }
23  }
24 
25  private float skillIncreasePerSabotage;
26  [Serialize(3.0f, IsPropertySaveable.Yes)]
28  {
29  get { return skillIncreasePerSabotage * GetCurrentSkillGainMultiplier(); }
30  set { skillIncreasePerSabotage = value; }
31  }
32 
33  private float skillIncreasePerCprRevive;
34  [Serialize(0.5f, IsPropertySaveable.Yes)]
36  {
37  get { return skillIncreasePerCprRevive * GetCurrentSkillGainMultiplier(); }
38  set { skillIncreasePerCprRevive = value; }
39  }
40 
41  private float skillIncreasePerRepairedStructureDamage;
42  [Serialize(0.0025f, IsPropertySaveable.Yes)]
44  {
45  get { return skillIncreasePerRepairedStructureDamage * GetCurrentSkillGainMultiplier(); }
46  set { skillIncreasePerRepairedStructureDamage = value; }
47  }
48 
49  private float skillIncreasePerSecondWhenSteering;
50  [Serialize(0.005f, IsPropertySaveable.Yes)]
52  {
53  get { return skillIncreasePerSecondWhenSteering * GetCurrentSkillGainMultiplier(); }
54  set { skillIncreasePerSecondWhenSteering = value; }
55  }
56 
57  private float skillIncreasePerFabricatorRequiredSkill;
58  [Serialize(0.5f, IsPropertySaveable.Yes)]
60  {
61  get { return skillIncreasePerFabricatorRequiredSkill * GetCurrentSkillGainMultiplier(); }
62  set { skillIncreasePerFabricatorRequiredSkill = value; }
63  }
64 
65  private float skillIncreasePerHostileDamage;
66  [Serialize(0.01f, IsPropertySaveable.Yes)]
68  {
69  get { return skillIncreasePerHostileDamage * GetCurrentSkillGainMultiplier(); }
70  set { skillIncreasePerHostileDamage = value; }
71  }
72 
73  private float skillIncreasePerSecondWhenOperatingTurret;
74  [Serialize(0.001f, IsPropertySaveable.Yes)]
76  {
77  get { return skillIncreasePerSecondWhenOperatingTurret * GetCurrentSkillGainMultiplier(); }
78  set { skillIncreasePerSecondWhenOperatingTurret = value; }
79  }
80 
81  private float skillIncreasePerFriendlyHealed;
82  [Serialize(0.001f, IsPropertySaveable.Yes)]
84  {
85  get { return skillIncreasePerFriendlyHealed * GetCurrentSkillGainMultiplier(); }
86  set { skillIncreasePerFriendlyHealed = value; }
87  }
88 
89  [Serialize(1.1f, IsPropertySaveable.Yes)]
91  {
92  get;
93  set;
94  }
95 
96  [Serialize(200.0f, IsPropertySaveable.Yes)]
98  {
99  get;
100  set;
101  }
102 
103  [Serialize(1.5f, IsPropertySaveable.Yes)]
105  {
106  get;
107  set;
108  }
109 
110  public SkillSettings(XElement element, SkillSettingsFile file) : base(file, "SkillSettings".ToIdentifier())
111  {
113  }
114 
115  public string Name => "SkillSettings";
116 
117  public Dictionary<Identifier, SerializableProperty> SerializableProperties
118  {
119  get;
120  set;
121  }
122 
123  private float GetCurrentSkillGainMultiplier()
124  {
126  {
127  return 1.0f;
128  }
129  else
130  {
132  }
133  }
134 
135  public override void Dispose() { }
136  }
137 }
static GameSession?? GameSession
Definition: GameMain.cs:88
static Dictionary< Identifier, SerializableProperty > DeserializeProperties(object obj, XElement element=null)
float SkillIncreasePerFabricatorRequiredSkill
float SkillIncreasePerSecondWhenOperatingTurret
Dictionary< Identifier, SerializableProperty > SerializableProperties
float SkillIncreasePerRepairedStructureDamage
SkillSettings(XElement element, SkillSettingsFile file)
static SkillSettings Current
float SkillIncreasePerSecondWhenSteering
static readonly PrefabSelector< SkillSettings > Prefabs
override void Dispose()