Client LuaCsForBarotrauma
CharacterAbilityGiveTalentPoints.cs
1 namespace Barotrauma.Abilities
2 {
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  {
22  }
23  }
24  }
25 }
CharacterAbilityGiveTalentPoints(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement)
ContentPackage? ContentPackage
int GetAttributeInt(string key, int def)