Client LuaCsForBarotrauma
CharacterAbilityModifyFlag.cs
1
namespace
Barotrauma.Abilities
2
{
3
class
CharacterAbilityModifyFlag
:
CharacterAbility
4
{
5
private
readonly
AbilityFlags
abilityFlag;
6
7
private
bool
lastState;
8
public
override
bool
AllowClientSimulation
=>
true
;
9
10
public
CharacterAbilityModifyFlag
(
CharacterAbilityGroup
characterAbilityGroup,
ContentXElement
abilityElement) : base(characterAbilityGroup, abilityElement)
11
{
12
abilityFlag =
CharacterAbilityGroup
.
ParseFlagType
(abilityElement.
GetAttributeString
(
"flagtype"
,
""
),
CharacterTalent
.
DebugIdentifier
);
13
}
14
15
protected
override
void
VerifyState
(
bool
conditionsMatched,
float
timeSinceLastUpdate)
16
{
17
if
(conditionsMatched != lastState)
18
{
19
if
(conditionsMatched)
20
{
21
Character
.
AddAbilityFlag
(abilityFlag);
22
}
23
else
24
{
25
Character
.
RemoveAbilityFlag
(abilityFlag);
26
}
27
28
lastState = conditionsMatched;
29
}
30
}
31
}
32
}
Barotrauma.Abilities.CharacterAbilityGroup
Definition:
CharacterAbilityGroup.cs:9
Barotrauma.Abilities.CharacterAbilityGroup.ParseFlagType
static AbilityFlags ParseFlagType(string flagTypeString, string debugIdentifier)
Definition:
CharacterAbilityGroup.cs:285
Barotrauma.Abilities.CharacterAbility
Definition:
CharacterAbility.cs:7
Barotrauma.Abilities.CharacterAbilityModifyFlag
Definition:
CharacterAbilityModifyFlag.cs:4
Barotrauma.Abilities.CharacterAbilityModifyFlag.VerifyState
override void VerifyState(bool conditionsMatched, float timeSinceLastUpdate)
Definition:
CharacterAbilityModifyFlag.cs:15
Barotrauma.Abilities.CharacterAbilityModifyFlag.AllowClientSimulation
override bool AllowClientSimulation
Definition:
CharacterAbilityModifyFlag.cs:8
Barotrauma.Abilities.CharacterAbilityModifyFlag.CharacterAbilityModifyFlag
CharacterAbilityModifyFlag(CharacterAbilityGroup characterAbilityGroup, ContentXElement abilityElement)
Definition:
CharacterAbilityModifyFlag.cs:10
Barotrauma.Character
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:32
Barotrauma.Character.RemoveAbilityFlag
void RemoveAbilityFlag(AbilityFlags abilityFlag)
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:5917
Barotrauma.Character.AddAbilityFlag
void AddAbilityFlag(AbilityFlags abilityFlag)
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:5912
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.Abilities
Definition:
AbilityCondition.cs:5
Barotrauma.AbilityFlags
AbilityFlags
AbilityFlags are a set of toggleable flags that can be applied to characters.
Definition:
Enums.cs:641
Barotrauma
BarotraumaShared
SharedSource
Characters
Talents
Abilities
CharacterAbilityModifyFlag.cs
Generated by
1.9.1