Client LuaCsForBarotrauma
AbilityConditionHasStatusTag.cs
1
using
System.Linq;
2
using
System.Xml.Linq;
3
4
namespace
Barotrauma.Abilities
5
{
6
class
AbilityConditionHasStatusTag
:
AbilityConditionDataless
7
{
8
private
readonly Identifier tag;
9
10
11
public
AbilityConditionHasStatusTag
(
CharacterTalent
characterTalent
,
ContentXElement
conditionElement) : base(
characterTalent
, conditionElement)
12
{
13
tag = conditionElement.
GetAttributeIdentifier
(
"tag"
, Identifier.Empty);
14
if
(tag.IsEmpty)
15
{
16
DebugConsole.AddWarning($
"Error in talent \"{characterTalent.Prefab.OriginalName}\" - tag not defined in AbilityConditionHasStatusTag."
,
17
characterTalent
.
Prefab
.
ContentPackage
);
18
}
19
}
20
21
protected
override
bool
MatchesConditionSpecific
()
22
{
23
if
(!tag.IsEmpty)
24
{
25
return
26
StatusEffect
.
DurationList
.Any(d => d.Targets.Contains(
character
) && d.Parent.HasTag(tag)) ||
27
DelayedEffect
.
DelayList
.Any(d => d.Targets.Contains(
character
) && d.Parent.HasTag(tag));
28
}
29
return
false
;
30
}
31
}
32
}
Barotrauma.Abilities.AbilityConditionDataless
Definition:
AbilityConditionDataless.cs:4
Barotrauma.Abilities.AbilityConditionHasStatusTag
Definition:
AbilityConditionHasStatusTag.cs:7
Barotrauma.Abilities.AbilityConditionHasStatusTag.MatchesConditionSpecific
override bool MatchesConditionSpecific()
Definition:
AbilityConditionHasStatusTag.cs:21
Barotrauma.Abilities.AbilityConditionHasStatusTag.AbilityConditionHasStatusTag
AbilityConditionHasStatusTag(CharacterTalent characterTalent, ContentXElement conditionElement)
Definition:
AbilityConditionHasStatusTag.cs:11
Barotrauma.Abilities.AbilityCondition.character
Character character
Definition:
AbilityCondition.cs:9
Barotrauma.Abilities.AbilityCondition.characterTalent
CharacterTalent characterTalent
Definition:
AbilityCondition.cs:8
Barotrauma.CharacterTalent
Definition:
CharacterTalent.cs:8
Barotrauma.CharacterTalent.Prefab
readonly TalentPrefab Prefab
Definition:
CharacterTalent.cs:12
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.ContentXElement.GetAttributeIdentifier
Identifier GetAttributeIdentifier(string key, string def)
Barotrauma.DelayedEffect
Definition:
DelayedEffect.cs:31
Barotrauma.DelayedEffect.DelayList
static readonly List< DelayedListElement > DelayList
Definition:
DelayedEffect.cs:32
Barotrauma.Prefab.ContentPackage
ContentPackage? ContentPackage
Definition:
Prefab.cs:37
Barotrauma.StatusEffect
StatusEffects can be used to execute various kinds of effects: modifying the state of some entity in ...
Definition:
BarotraumaShared/SharedSource/StatusEffects/StatusEffect.cs:72
Barotrauma.StatusEffect.DurationList
static readonly List< DurationListElement > DurationList
Definition:
BarotraumaShared/SharedSource/StatusEffects/StatusEffect.cs:575
Barotrauma.Abilities
Definition:
AbilityCondition.cs:5
Barotrauma
BarotraumaShared
SharedSource
Characters
Talents
Abilities
AbilityConditionals
AbilityConditionDataless
AbilityConditionHasStatusTag.cs
Generated by
1.9.1