Barotrauma Client Doc
Barotrauma.CountTargetsAction Class Reference
Inheritance diagram for Barotrauma.CountTargetsAction:
Barotrauma.BinaryOptionAction Barotrauma.EventAction

Public Member Functions

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

Protected Member Functions

override? bool DetermineSuccess ()
 
- Protected Member Functions inherited from Barotrauma.BinaryOptionAction
bool DetermineFinished ()
 
bool DetermineFinished (ref string goTo)
 
bool HasBeenDetermined ()
 
- Protected Member Functions inherited from Barotrauma.EventAction
void ApplyTagsToHulls (Entity entity, Identifier hullTag, Identifier linkedHullTag)
 

Properties

Identifier TargetTag [get, set]
 
Identifier SecondRequiredTargetTag [get, set]
 
Identifier HullTag [get, set]
 
int MinAmount [get, set]
 
int MaxAmount [get, set]
 
Identifier CompareToTarget [get, set]
 
float MinPercentageRelativeToTarget [get, set]
 Minimum amount of targets, as a percentage of the number of entities tagged with CompareToTarget E.g. you could compare the number of entities tagged as "discoveredhull" to entities tagged as "anyhull" to require 50% of hulls to be discovered. More...
 
float MaxPercentageRelativeToTarget [get, set]
 Maximum amount of targets, as a percentage of the number of entities tagged with CompareToTarget E.g. you could compare the number of entities tagged as "floodedhull" to entities tagged as "anyhull" to require less than 50% of hulls to be flooded. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from Barotrauma.EventAction
static EventAction Instantiate (ScriptedEvent scriptedEvent, ContentXElement element)
 
- Public Attributes inherited from Barotrauma.BinaryOptionAction
SubactionGroup Success = null
 
SubactionGroup Failure = null
 
- Public Attributes inherited from Barotrauma.EventAction
readonly ScriptedEvent ParentEvent
 
- Protected Attributes inherited from Barotrauma.BinaryOptionAction
bool? succeeded = null
 

Detailed Description

Definition at line 8 of file CountTargetsAction.cs.

Constructor & Destructor Documentation

◆ CountTargetsAction()

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

Definition at line 46 of file CountTargetsAction.cs.

Member Function Documentation

◆ DetermineSuccess()

override? bool Barotrauma.CountTargetsAction.DetermineSuccess ( )
protectedvirtual

Implements Barotrauma.BinaryOptionAction.

Definition at line 78 of file CountTargetsAction.cs.

◆ ToDebugString()

override string Barotrauma.CountTargetsAction.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 116 of file CountTargetsAction.cs.

Property Documentation

◆ CompareToTarget

Identifier Barotrauma.CountTargetsAction.CompareToTarget
getset

Definition at line 26 of file CountTargetsAction.cs.

◆ HullTag

Identifier Barotrauma.CountTargetsAction.HullTag
getset

Definition at line 17 of file CountTargetsAction.cs.

◆ MaxAmount

int Barotrauma.CountTargetsAction.MaxAmount
getset

Definition at line 23 of file CountTargetsAction.cs.

◆ MaxPercentageRelativeToTarget

float Barotrauma.CountTargetsAction.MaxPercentageRelativeToTarget
getset

Maximum amount of targets, as a percentage of the number of entities tagged with CompareToTarget E.g. you could compare the number of entities tagged as "floodedhull" to entities tagged as "anyhull" to require less than 50% of hulls to be flooded.

Definition at line 42 of file CountTargetsAction.cs.

◆ MinAmount

int Barotrauma.CountTargetsAction.MinAmount
getset

Definition at line 20 of file CountTargetsAction.cs.

◆ MinPercentageRelativeToTarget

float Barotrauma.CountTargetsAction.MinPercentageRelativeToTarget
getset

Minimum amount of targets, as a percentage of the number of entities tagged with CompareToTarget E.g. you could compare the number of entities tagged as "discoveredhull" to entities tagged as "anyhull" to require 50% of hulls to be discovered.

Definition at line 34 of file CountTargetsAction.cs.

◆ SecondRequiredTargetTag

Identifier Barotrauma.CountTargetsAction.SecondRequiredTargetTag
getset

Definition at line 14 of file CountTargetsAction.cs.

◆ TargetTag

Identifier Barotrauma.CountTargetsAction.TargetTag
getset

Definition at line 11 of file CountTargetsAction.cs.