Barotrauma Client Doc
Barotrauma.SetDataAction Class Reference
Inheritance diagram for Barotrauma.SetDataAction:
Barotrauma.EventAction

Public Types

enum class  OperationType { Set , Multiply , Add }
 

Public Member Functions

 SetDataAction (ScriptedEvent parentEvent, ContentXElement element)
 
override bool IsFinished (ref string goTo)
 Has the action finished. More...
 
override void Reset ()
 
override void Update (float deltaTime)
 
override string ToDebugString ()
 Rich test to display in debugdraw More...
 
- Public Member Functions inherited from Barotrauma.EventAction
 EventAction (ScriptedEvent parentEvent, ContentXElement element)
 
virtual bool SetGoToTarget (string goTo)
 
virtual bool CanBeFinished ()
 
virtual IEnumerable< EventActionGetSubActions ()
 

Static Public Member Functions

static void PerformOperation (CampaignMetadata metadata, Identifier identifier, object value, OperationType operation)
 
static object ConvertXMLValue (string value)
 
- Static Public Member Functions inherited from Barotrauma.EventAction
static EventAction Instantiate (ScriptedEvent scriptedEvent, ContentXElement element)
 

Properties

OperationType Operation [get, set]
 
string Value = null! [get, set]
 
Identifier Identifier [get, set]
 

Additional Inherited Members

- Public Attributes inherited from Barotrauma.EventAction
readonly ScriptedEvent ParentEvent
 
- Protected Member Functions inherited from Barotrauma.EventAction
void ApplyTagsToHulls (Entity entity, Identifier hullTag, Identifier linkedHullTag)
 

Detailed Description

Definition at line 6 of file SetDataAction.cs.

Member Enumeration Documentation

◆ OperationType

Enumerator
Set 
Multiply 
Add 

Definition at line 8 of file SetDataAction.cs.

Constructor & Destructor Documentation

◆ SetDataAction()

Barotrauma.SetDataAction.SetDataAction ( ScriptedEvent  parentEvent,
ContentXElement  element 
)

Definition at line 15 of file SetDataAction.cs.

Member Function Documentation

◆ ConvertXMLValue()

static object Barotrauma.SetDataAction.ConvertXMLValue ( string  value)
static

Definition at line 89 of file SetDataAction.cs.

◆ IsFinished()

override bool Barotrauma.SetDataAction.IsFinished ( ref string  goToLabel)
virtual

Has the action finished.

Parameters
goToLabelIf null or empty, the event moves to the next action. Otherwise it moves to the specified label.
Returns

Implements Barotrauma.EventAction.

Definition at line 28 of file SetDataAction.cs.

◆ PerformOperation()

static void Barotrauma.SetDataAction.PerformOperation ( CampaignMetadata  metadata,
Identifier  identifier,
object  value,
OperationType  operation 
)
static

Definition at line 50 of file SetDataAction.cs.

◆ Reset()

override void Barotrauma.SetDataAction.Reset ( )
virtual

Implements Barotrauma.EventAction.

Definition at line 32 of file SetDataAction.cs.

◆ ToDebugString()

override string Barotrauma.SetDataAction.ToDebugString ( )
virtual

Rich test to display in debugdraw

public override string ToDebugString()
{
return $"{ToolBox.GetDebugSymbol(isFinished)} SomeAction -> "(someInfo: {info.ColorizeObject()})";
}
override string ToDebugString()
Rich test to display in debugdraw
Returns

Reimplemented from Barotrauma.EventAction.

Definition at line 104 of file SetDataAction.cs.

◆ Update()

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

Reimplemented from Barotrauma.EventAction.

Definition at line 37 of file SetDataAction.cs.

Property Documentation

◆ Identifier

Identifier Barotrauma.SetDataAction.Identifier
getset

Definition at line 24 of file SetDataAction.cs.

◆ Operation

OperationType Barotrauma.SetDataAction.Operation
getset

Definition at line 18 of file SetDataAction.cs.

◆ Value

string Barotrauma.SetDataAction.Value = null!
getset

Definition at line 21 of file SetDataAction.cs.