Client LuaCsForBarotrauma
AbilityConditionNoCrewDied.cs
1
namespace
Barotrauma.Abilities
2
{
3
class
AbilityConditionNoCrewDied
:
AbilityConditionDataless
4
{
5
public
bool
assistantsDontCount
;
6
7
public
AbilityConditionNoCrewDied
(
CharacterTalent
characterTalent
,
ContentXElement
conditionElement) : base(
characterTalent
, conditionElement)
8
{
9
assistantsDontCount
= conditionElement.
GetAttributeBool
(nameof(
assistantsDontCount
),
true
);
10
}
11
12
protected
override
bool
MatchesConditionSpecific
()
13
{
14
if
(
GameMain
.
GameSession
==
null
) {
return
false
; }
15
16
foreach
(
Character
deadCharacter
in
GameMain
.
GameSession
.
Casualties
)
17
{
18
if
(deadCharacter.
TeamID
!=
character
.
TeamID
) {
continue
; }
19
20
if
(
assistantsDontCount
&& deadCharacter.
Info
?.
Job
?.
Prefab
.
Identifier
==
"assistant"
)
21
{
22
continue
;
23
}
24
if
(deadCharacter.
CauseOfDeath
!=
null
&& deadCharacter.
CauseOfDeath
.
Type
!=
CauseOfDeathType
.Disconnected)
25
{
26
return
false
;
27
}
28
}
29
return
true
;
30
}
31
}
32
}
Barotrauma.Abilities.AbilityConditionDataless
Definition:
AbilityConditionDataless.cs:4
Barotrauma.Abilities.AbilityCondition.character
Character character
Definition:
AbilityCondition.cs:9
Barotrauma.Abilities.AbilityCondition.characterTalent
CharacterTalent characterTalent
Definition:
AbilityCondition.cs:8
Barotrauma.Abilities.AbilityConditionNoCrewDied
Definition:
AbilityConditionNoCrewDied.cs:4
Barotrauma.Abilities.AbilityConditionNoCrewDied.AbilityConditionNoCrewDied
AbilityConditionNoCrewDied(CharacterTalent characterTalent, ContentXElement conditionElement)
Definition:
AbilityConditionNoCrewDied.cs:7
Barotrauma.Abilities.AbilityConditionNoCrewDied.MatchesConditionSpecific
override bool MatchesConditionSpecific()
Definition:
AbilityConditionNoCrewDied.cs:12
Barotrauma.Abilities.AbilityConditionNoCrewDied.assistantsDontCount
bool assistantsDontCount
Definition:
AbilityConditionNoCrewDied.cs:5
Barotrauma.CauseOfDeath.Type
readonly CauseOfDeathType Type
Definition:
CauseOfDeath.cs:12
Barotrauma.Character
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:32
Barotrauma.Character.CauseOfDeath
CauseOfDeath CauseOfDeath
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:1166
Barotrauma.Character.Info
CharacterInfo Info
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:556
Barotrauma.Character.TeamID
CharacterTeamType TeamID
Definition:
BarotraumaShared/SharedSource/Characters/Character.cs:210
Barotrauma.CharacterInfo.Job
Job Job
Definition:
BarotraumaShared/SharedSource/Characters/CharacterInfo.cs:348
Barotrauma.CharacterTalent
Definition:
CharacterTalent.cs:8
Barotrauma.ContentXElement
Definition:
ContentXElement.cs:13
Barotrauma.ContentXElement.GetAttributeBool
bool GetAttributeBool(string key, bool def)
Barotrauma.GameMain
Definition:
GameMain.cs:25
Barotrauma.GameMain.GameSession
static GameSession?? GameSession
Definition:
GameMain.cs:88
Barotrauma.GameSession.Casualties
IEnumerable< Character > Casualties
Definition:
BarotraumaShared/SharedSource/GameSession/GameSession.cs:88
Barotrauma.Job.Prefab
JobPrefab Prefab
Definition:
Job.cs:18
Barotrauma.Prefab.Identifier
readonly Identifier Identifier
Definition:
Prefab.cs:34
Barotrauma.Abilities
Definition:
AbilityCondition.cs:5
Barotrauma.CauseOfDeathType
CauseOfDeathType
Definition:
CauseOfDeath.cs:6
Barotrauma
BarotraumaShared
SharedSource
Characters
Talents
Abilities
AbilityConditionals
AbilityConditionDataless
AbilityConditionNoCrewDied.cs
Generated by
1.9.1