Barotrauma Client Doc
Barotrauma.TraitorEvent Class Reference
Inheritance diagram for Barotrauma.TraitorEvent:
Barotrauma.ScriptedEvent Barotrauma.Event

Public Types

enum class  State { Incomplete , Completed , Failed }
 

Public Member Functions

override string ToString ()
 
 TraitorEvent (TraitorEventPrefab prefab)
 
override void Init (EventSet? parentSet=null)
 
override LocalizedString ReplaceVariablesInEventText (LocalizedString str)
 
void SetTraitor (Client traitor)
 
void SetSecondaryTraitors (IEnumerable< Client > traitors)
 
- Public Member Functions inherited from Barotrauma.ScriptedEvent
sealed record TargetPredicate (TargetPredicate.EntityType Type, Predicate< Entity > Predicate)
 
override string ToString ()
 
 ScriptedEvent (EventPrefab prefab)
 
override string GetDebugInfo ()
 
virtual string GetTextForReplacementElement (string tag)
 
List<(int indent, EventAction action)> GetAllActions ()
 Finds all actions in the ScriptedEvent (recursively going through the subactions as well). Returns a list of tuples where the first value is the indentation level (or "how deep in the hierarchy") the action is. More...
 
void AddTarget (Identifier tag, Entity target)
 
void AddTargetPredicate (Identifier tag, TargetPredicate.EntityType entityType, Predicate< Entity > predicate)
 
int GetInitialTargetCount (Identifier tag)
 
IEnumerable< EntityGetTargets (Identifier tag)
 
void InheritTags (Entity originalEntity, Entity newEntity)
 
void RemoveTag (Identifier tag)
 
override void Update (float deltaTime)
 
void EntitySpawned (Entity entity)
 
override bool LevelMeetsRequirements ()
 
override void Finish ()
 
- Public Member Functions inherited from Barotrauma.Event
override string ToString ()
 
 Event (EventPrefab prefab)
 
virtual IEnumerable< ContentFileGetFilesToPreload ()
 
virtual void Init (EventSet parentSet=null)
 

Public Attributes

Action? OnStateChanged
 
- Public Attributes inherited from Barotrauma.ScriptedEvent
readonly OnRoundEndAction OnRoundEndAction
 
readonly bool RequireBeaconStation
 
- Public Attributes inherited from Barotrauma.Event
int RandomSeed
 
Func< Level.InterestingPosition, bool > SpawnPosFilter
 

Properties

new TraitorEventPrefab Prefab [get]
 
StateCurrentState [get, set]
 
ClientTraitor [get]
 
IEnumerable< ClientSecondaryTraitors [get]
 
override IEnumerable< IdentifierNonActionChildElementNames [get]
 
- Properties inherited from Barotrauma.ScriptedEvent
int CurrentActionIndex [get]
 
List< EventActionActions = new List<EventAction>() [get]
 
Dictionary< Identifier, List< Entity > > Targets = new Dictionary<Identifier, List<Entity>>() [get]
 
virtual IEnumerable< IdentifierNonActionChildElementNames [get]
 
- Properties inherited from Barotrauma.Event
EventPrefab Prefab [get]
 
EventSet ParentSet [get]
 
bool IsFinished [get]
 
virtual Vector2 DebugDrawPos [get]
 

Additional Inherited Members

- Protected Attributes inherited from Barotrauma.Event
bool isFinished
 
readonly EventPrefab prefab
 
- Events inherited from Barotrauma.Event
Action Finished
 

Detailed Description

Definition at line 9 of file TraitorEvent.cs.

Member Enumeration Documentation

◆ State

Enumerator
Incomplete 
Completed 
Failed 

Definition at line 11 of file TraitorEvent.cs.

Constructor & Destructor Documentation

◆ TraitorEvent()

Barotrauma.TraitorEvent.TraitorEvent ( TraitorEventPrefab  prefab)

Definition at line 60 of file TraitorEvent.cs.

Member Function Documentation

◆ Init()

override void Barotrauma.TraitorEvent.Init ( EventSet parentSet = null)

Definition at line 66 of file TraitorEvent.cs.

◆ ReplaceVariablesInEventText()

override LocalizedString Barotrauma.TraitorEvent.ReplaceVariablesInEventText ( LocalizedString  str)
virtual

Reimplemented from Barotrauma.ScriptedEvent.

Definition at line 75 of file TraitorEvent.cs.

◆ SetSecondaryTraitors()

void Barotrauma.TraitorEvent.SetSecondaryTraitors ( IEnumerable< Client traitors)

Definition at line 103 of file TraitorEvent.cs.

◆ SetTraitor()

void Barotrauma.TraitorEvent.SetTraitor ( Client  traitor)

Definition at line 89 of file TraitorEvent.cs.

◆ ToString()

override string Barotrauma.TraitorEvent.ToString ( )

Definition at line 46 of file TraitorEvent.cs.

Member Data Documentation

◆ OnStateChanged

Action? Barotrauma.TraitorEvent.OnStateChanged

Definition at line 18 of file TraitorEvent.cs.

Property Documentation

◆ CurrentState

State? Barotrauma.TraitorEvent.CurrentState
getset

Definition at line 27 of file TraitorEvent.cs.

◆ NonActionChildElementNames

override IEnumerable<Identifier> Barotrauma.TraitorEvent.NonActionChildElementNames
getprotected

Definition at line 58 of file TraitorEvent.cs.

◆ Prefab

new TraitorEventPrefab Barotrauma.TraitorEvent.Prefab
get

Definition at line 22 of file TraitorEvent.cs.

◆ SecondaryTraitors

IEnumerable<Client> Barotrauma.TraitorEvent.SecondaryTraitors
get

Definition at line 44 of file TraitorEvent.cs.

◆ Traitor

Client? Barotrauma.TraitorEvent.Traitor
get

Definition at line 40 of file TraitorEvent.cs.