Client LuaCsForBarotrauma
CharacterAbilityGiveTalentPoints.cs
1
namespace
Barotrauma.Abilities
2
{
3
class
CharacterAbilityGiveTalentPoints
:
CharacterAbility
4
{
5
private
readonly
int
amount;
6
7
public
CharacterAbilityGiveTalentPoints
(
CharacterAbilityGroup
characterAbilityGroup,
ContentXElement
abilityElement) : base(characterAbilityGroup, abilityElement)
8
{
9
amount = abilityElement.
GetAttributeInt
(
"amount"
, 0);
10
if
(amount == 0)
11
{
12
DebugConsole.ThrowError($
"Error in talent {CharacterTalent.DebugIdentifier}, amount of talent points to give is 0."
,
13
contentPackage: abilityElement.
ContentPackage
);
14
}
15
}
16
17
public
override
void
InitializeAbility
(
bool
addingFirstTime)
18
{
19
if
(addingFirstTime &&
Character
.
Info
!=
null
)
20
{
21
Character
.
Info
.
AdditionalTalentPoints
+= amount;
22
}
23
}
24
}
25
}
Barotrauma.Abilities.CharacterAbilityGiveTalentPoints
Definition:
CharacterAbilityGiveTalentPoints.cs:4
Barotrauma.Abilities.CharacterAbilityGiveTalentPoints.CharacterAbilityGiveTalentPoints
CharacterAbilityGiveTalentPoints(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement)
Definition:
CharacterAbilityGiveTalentPoints.cs:7
Barotrauma.Abilities.CharacterAbilityGiveTalentPoints.InitializeAbility
override void InitializeAbility(bool addingFirstTime)
Definition:
CharacterAbilityGiveTalentPoints.cs:17
Barotrauma.Abilities.CharacterAbilityGroup
Definition:
CharacterAbilityGroup.cs:9
Barotrauma.Abilities.CharacterAbility
Definition:
CharacterAbility.cs:7
Barotrauma.Character
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:32
Barotrauma.Character.Info
CharacterInfo Info
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:556
Barotrauma.CharacterInfo.AdditionalTalentPoints
int AdditionalTalentPoints
Definition:
BarotraumaShared/SharedSource/Characters/CharacterInfo.cs:403
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.ContentXElement.ContentPackage
ContentPackage? ContentPackage
Definition:
ContentXElement.cs:14
Barotrauma.ContentXElement.GetAttributeInt
int GetAttributeInt(string key, int def)
Barotrauma.Abilities
Definition:
AbilityCondition.cs:5
Barotrauma
BarotraumaShared
SharedSource
Characters
Talents
Abilities
CharacterAbilityGiveTalentPoints.cs
Generated by
1.9.1