Barotrauma Server
Loading...
Searching...
No Matches
Barotrauma.SetDataAction Class Reference

Sets a campaign metadata value. The metadata can be any arbitrary data you want to save: for example, whether some event has been completed, the number of times something has been done during the campaign, or at what stage of some multi-part event chain the crew is at. More...

Inheritance diagram for Barotrauma.SetDataAction:
Barotrauma.EventAction

Public Types

enum  OperationType { Set , Multiply , Add }
 

Public Member Functions

 SetDataAction (ScriptedEvent parentEvent, ContentXElement element)
 
override bool IsFinished (ref string goTo)
 
override void Reset ()
 
override void Update (float deltaTime)
 
override string ToDebugString ()
 Rich test to display in debugdraw.
 
- Public Member Functions inherited from Barotrauma.EventAction
 EventAction (ScriptedEvent parentEvent, ContentXElement element)
 
bool IsFinished (ref string goToLabel)
 Has the action finished.
 
virtual bool SetGoToTarget (string goTo)
 
void Reset ()
 
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)
 
string GetEventDebugName ()
 

Detailed Description

Sets a campaign metadata value. The metadata can be any arbitrary data you want to save: for example, whether some event has been completed, the number of times something has been done during the campaign, or at what stage of some multi-part event chain the crew is at.

Member Enumeration Documentation

◆ OperationType

Enumerator
Set 
Multiply 
Add 

Constructor & Destructor Documentation

◆ SetDataAction()

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

Member Function Documentation

◆ ConvertXMLValue()

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

◆ IsFinished()

override bool Barotrauma.SetDataAction.IsFinished ( ref string goTo)

◆ PerformOperation()

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

◆ Reset()

override void Barotrauma.SetDataAction.Reset ( )

◆ 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.
Definition SetDataAction.cs:106
Returns

Reimplemented from Barotrauma.EventAction.

◆ Update()

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

Reimplemented from Barotrauma.EventAction.

Property Documentation

◆ Identifier

Identifier Barotrauma.SetDataAction.Identifier
getset

◆ Operation

OperationType Barotrauma.SetDataAction.Operation
getset

◆ Value

string Barotrauma.SetDataAction.Value = null!
getset

The documentation for this class was generated from the following file: