Client LuaCsForBarotrauma
CharacterAbilityGiveStat.cs
1
namespace
Barotrauma.Abilities
2
{
3
class
CharacterAbilityGiveStat
:
CharacterAbility
4
{
5
private
readonly
StatTypes
statType;
6
private
readonly
float
value;
7
8
public
CharacterAbilityGiveStat
(
CharacterAbilityGroup
characterAbilityGroup,
ContentXElement
abilityElement) : base(characterAbilityGroup, abilityElement)
9
{
10
statType =
CharacterAbilityGroup
.
ParseStatType
(abilityElement.
GetAttributeString
(
"stattype"
,
""
),
CharacterTalent
.
DebugIdentifier
);
11
value = abilityElement.
GetAttributeFloat
(
"value"
, 0f);
12
}
13
14
public
override
void
InitializeAbility
(
bool
addingFirstTime)
15
{
16
Character
.
ChangeStat
(statType, value);
17
}
18
}
19
}
Barotrauma.Abilities.CharacterAbilityGiveStat
Definition:
CharacterAbilityGiveStat.cs:4
Barotrauma.Abilities.CharacterAbilityGiveStat.CharacterAbilityGiveStat
CharacterAbilityGiveStat(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement)
Definition:
CharacterAbilityGiveStat.cs:8
Barotrauma.Abilities.CharacterAbilityGiveStat.InitializeAbility
override void InitializeAbility(bool addingFirstTime)
Definition:
CharacterAbilityGiveStat.cs:14
Barotrauma.Abilities.CharacterAbilityGroup
Definition:
CharacterAbilityGroup.cs:9
Barotrauma.Abilities.CharacterAbilityGroup.ParseStatType
static StatTypes ParseStatType(string statTypeString, string debugIdentifier)
Definition:
CharacterAbilityGroup.cs:238
Barotrauma.Abilities.CharacterAbility
Definition:
CharacterAbility.cs:7
Barotrauma.Character
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:32
Barotrauma.Character.ChangeStat
void ChangeStat(StatTypes statType, float value)
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:5878
Barotrauma.CharacterTalent
Definition:
CharacterTalent.cs:8
Barotrauma.CharacterTalent.DebugIdentifier
string DebugIdentifier
Definition:
CharacterTalent.cs:10
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.ContentXElement.GetAttributeString
string? GetAttributeString(string key, string? def)
Barotrauma.ContentXElement.GetAttributeFloat
float GetAttributeFloat(string key, float def)
Barotrauma.Abilities
Definition:
AbilityCondition.cs:5
Barotrauma.StatTypes
StatTypes
StatTypes are used to alter several traits of a character. They are mostly used by talents.
Definition:
Enums.cs:195
Barotrauma
BarotraumaShared
SharedSource
Characters
Talents
Abilities
CharacterAbilityGiveStat.cs
Generated by
1.9.1