Client LuaCsForBarotrauma
CharacterAbilityGiveFlag.cs
1 namespace Barotrauma.Abilities
2 {
4  {
5  private readonly AbilityFlags abilityFlag;
6 
7  // this and resistance giving should probably be moved directly to charactertalent attributes, as they don't need to interact with either ability group types
8  public CharacterAbilityGiveFlag(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement) : base(characterAbilityGroup, abilityElement)
9  {
10  abilityFlag = CharacterAbilityGroup.ParseFlagType(abilityElement.GetAttributeString("flagtype", ""), CharacterTalent.DebugIdentifier);
11  }
12 
13  public override void InitializeAbility(bool addingFirstTime)
14  {
15  Character.AddAbilityFlag(abilityFlag);
16  }
17  }
18 }
override void InitializeAbility(bool addingFirstTime)
CharacterAbilityGiveFlag(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement)
static AbilityFlags ParseFlagType(string flagTypeString, string debugIdentifier)
string? GetAttributeString(string key, string? def)
AbilityFlags
AbilityFlags are a set of toggleable flags that can be applied to characters.
Definition: Enums.cs:641