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

Public Member Functions

sealed record TargetPredicate (TargetPredicate.EntityType Type, Predicate< Entity > Predicate)
 
override string ToString ()
 
 ScriptedEvent (EventPrefab prefab)
 
override string GetDebugInfo ()
 
virtual string GetTextForReplacementElement (string tag)
 
virtual LocalizedString ReplaceVariablesInEventText (LocalizedString str)
 
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

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

Properties

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 8 of file ScriptedEvent.cs.

Constructor & Destructor Documentation

◆ ScriptedEvent()

Barotrauma.ScriptedEvent.ScriptedEvent ( EventPrefab  prefab)

Definition at line 54 of file ScriptedEvent.cs.

Member Function Documentation

◆ AddTarget()

void Barotrauma.ScriptedEvent.AddTarget ( Identifier  tag,
Entity  target 
)

Definition at line 170 of file ScriptedEvent.cs.

◆ AddTargetPredicate()

void Barotrauma.ScriptedEvent.AddTargetPredicate ( Identifier  tag,
TargetPredicate.EntityType  entityType,
Predicate< Entity predicate 
)

Definition at line 208 of file ScriptedEvent.cs.

◆ EntitySpawned()

void Barotrauma.ScriptedEvent.EntitySpawned ( Entity  entity)

Definition at line 410 of file ScriptedEvent.cs.

◆ Finish()

override void Barotrauma.ScriptedEvent.Finish ( )
virtual

Reimplemented from Barotrauma.Event.

Definition at line 450 of file ScriptedEvent.cs.

◆ GetAllActions()

List<(int indent, EventAction action)> Barotrauma.ScriptedEvent.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.

Definition at line 149 of file ScriptedEvent.cs.

◆ GetDebugInfo()

override string Barotrauma.ScriptedEvent.GetDebugInfo ( )
virtual

Reimplemented from Barotrauma.Event.

Definition at line 97 of file ScriptedEvent.cs.

◆ GetInitialTargetCount()

int Barotrauma.ScriptedEvent.GetInitialTargetCount ( Identifier  tag)

Definition at line 222 of file ScriptedEvent.cs.

◆ GetTargets()

IEnumerable<Entity> Barotrauma.ScriptedEvent.GetTargets ( Identifier  tag)

Definition at line 231 of file ScriptedEvent.cs.

◆ GetTextForReplacementElement()

virtual string Barotrauma.ScriptedEvent.GetTextForReplacementElement ( string  tag)
virtual

Definition at line 116 of file ScriptedEvent.cs.

◆ InheritTags()

void Barotrauma.ScriptedEvent.InheritTags ( Entity  originalEntity,
Entity  newEntity 
)

Definition at line 299 of file ScriptedEvent.cs.

◆ LevelMeetsRequirements()

override bool Barotrauma.ScriptedEvent.LevelMeetsRequirements ( )
virtual

Reimplemented from Barotrauma.Event.

Definition at line 434 of file ScriptedEvent.cs.

◆ RemoveTag()

void Barotrauma.ScriptedEvent.RemoveTag ( Identifier  tag)

Definition at line 310 of file ScriptedEvent.cs.

◆ ReplaceVariablesInEventText()

virtual LocalizedString Barotrauma.ScriptedEvent.ReplaceVariablesInEventText ( LocalizedString  str)
virtual

Reimplemented in Barotrauma.TraitorEvent.

Definition at line 140 of file ScriptedEvent.cs.

◆ TargetPredicate()

sealed record Barotrauma.ScriptedEvent.TargetPredicate ( TargetPredicate.EntityType  Type,
Predicate< Entity Predicate 
)

Definition at line 10 of file ScriptedEvent.cs.

◆ ToString()

override string Barotrauma.ScriptedEvent.ToString ( )

Definition at line 49 of file ScriptedEvent.cs.

◆ Update()

override void Barotrauma.ScriptedEvent.Update ( float  deltaTime)
virtual

Reimplemented from Barotrauma.Event.

Definition at line 318 of file ScriptedEvent.cs.

Member Data Documentation

◆ OnRoundEndAction

readonly OnRoundEndAction Barotrauma.ScriptedEvent.OnRoundEndAction

Definition at line 38 of file ScriptedEvent.cs.

◆ RequireBeaconStation

readonly bool Barotrauma.ScriptedEvent.RequireBeaconStation

Definition at line 41 of file ScriptedEvent.cs.

Property Documentation

◆ Actions

List<EventAction> Barotrauma.ScriptedEvent.Actions = new List<EventAction>()
get

Definition at line 44 of file ScriptedEvent.cs.

◆ CurrentActionIndex

int Barotrauma.ScriptedEvent.CurrentActionIndex
get

Definition at line 43 of file ScriptedEvent.cs.

◆ NonActionChildElementNames

virtual IEnumerable<Identifier> Barotrauma.ScriptedEvent.NonActionChildElementNames
getprotected

Definition at line 47 of file ScriptedEvent.cs.

◆ Targets

Dictionary<Identifier, List<Entity> > Barotrauma.ScriptedEvent.Targets = new Dictionary<Identifier, List<Entity>>()
get

Definition at line 45 of file ScriptedEvent.cs.