Client LuaCsForBarotrauma
CharacterAbilityMultitasker.cs
1 namespace Barotrauma.Abilities
2 {
4  {
5  private Identifier lastSkillIdentifier;
6 
7  public CharacterAbilityMultitasker(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement) : base(characterAbilityGroup, abilityElement)
8  {
9  }
10 
11  protected override void ApplyEffect(AbilityObject abilityObject)
12  {
13  if (abilityObject is IAbilitySkillIdentifier { SkillIdentifier: Identifier skillIdentifier })
14  {
15  if (skillIdentifier != lastSkillIdentifier)
16  {
17  lastSkillIdentifier = skillIdentifier;
18  Character.Info?.IncreaseSkillLevel(skillIdentifier, 1.0f, gainedFromAbility: true);
19  }
20  }
21  }
22  }
23 }
override void ApplyEffect(AbilityObject abilityObject)
CharacterAbilityMultitasker(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement)
void IncreaseSkillLevel(Identifier skillIdentifier, float increase, bool gainedFromAbility=false, bool forceNotification=false)
Increase the skill by a specific amount. Talents may affect the actual, final skill increase.