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

Public Types

enum class  SpawnLocationType {
  Any , MainSub , Outpost , MainPath ,
  Ruin , Wreck , BeaconStation , NearMainSub
}
 

Public Member Functions

 SpawnAction (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 Vector2 OffsetSpawnPos (Vector2 pos, float offset)
 
static WayPoint GetSpawnPos (SpawnLocationType spawnLocation, SpawnType? spawnPointType, IEnumerable< Identifier > moduleFlags=null, IEnumerable< Identifier > spawnpointTags=null, bool asFarAsPossibleFromAirlock=false, bool requireTaggedSpawnPoint=false, bool allowInPlayerView=true)
 
- Static Public Member Functions inherited from Barotrauma.EventAction
static EventAction Instantiate (ScriptedEvent scriptedEvent, ContentXElement element)
 

Properties

Identifier SpeciesName [get, set]
 
Identifier NPCSetIdentifier [get, set]
 
Identifier NPCIdentifier [get, set]
 
bool LootingIsStealing [get, set]
 
Identifier ItemIdentifier [get, set]
 
Identifier TargetTag [get, set]
 
Identifier TargetInventory [get, set]
 
SpawnLocationType SpawnLocation [get, set]
 
SpawnType SpawnPointType [get, set]
 
Identifier SpawnPointTag [get, set]
 
CharacterTeamType TeamID [get, protected set]
 
bool RequireSpawnPointTag [get, set]
 
bool AllowDuplicates [get, set]
 
int Amount [get, set]
 
float Offset [get, set]
 
string TargetModuleTags [get, set]
 
bool IgnoreByAI [get, set]
 
bool AllowInPlayerView [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 9 of file SpawnAction.cs.

Member Enumeration Documentation

◆ SpawnLocationType

Enumerator
Any 
MainSub 
Outpost 
MainPath 
Ruin 
Wreck 
BeaconStation 
NearMainSub 

Definition at line 11 of file SpawnAction.cs.

Constructor & Destructor Documentation

◆ SpawnAction()

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

Definition at line 99 of file SpawnAction.cs.

Member Function Documentation

◆ GetSpawnPos()

static WayPoint Barotrauma.SpawnAction.GetSpawnPos ( SpawnLocationType  spawnLocation,
SpawnType spawnPointType,
IEnumerable< Identifier moduleFlags = null,
IEnumerable< Identifier spawnpointTags = null,
bool  asFarAsPossibleFromAirlock = false,
bool  requireTaggedSpawnPoint = false,
bool  allowInPlayerView = true 
)
static

Definition at line 385 of file SpawnAction.cs.

◆ IsFinished()

override bool Barotrauma.SpawnAction.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 113 of file SpawnAction.cs.

◆ OffsetSpawnPos()

static Vector2 Barotrauma.SpawnAction.OffsetSpawnPos ( Vector2  pos,
float  offset 
)
static

Definition at line 306 of file SpawnAction.cs.

◆ Reset()

override void Barotrauma.SpawnAction.Reset ( )
virtual

Implements Barotrauma.EventAction.

Definition at line 125 of file SpawnAction.cs.

◆ ToDebugString()

override string Barotrauma.SpawnAction.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: SpawnAction.cs:506
Returns

Reimplemented from Barotrauma.EventAction.

Definition at line 506 of file SpawnAction.cs.

◆ Update()

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

Reimplemented from Barotrauma.EventAction.

Definition at line 131 of file SpawnAction.cs.

Property Documentation

◆ AllowDuplicates

bool Barotrauma.SpawnAction.AllowDuplicates
getset

Definition at line 62 of file SpawnAction.cs.

◆ AllowInPlayerView

bool Barotrauma.SpawnAction.AllowInPlayerView
getset

Definition at line 92 of file SpawnAction.cs.

◆ Amount

int Barotrauma.SpawnAction.Amount
getset

Definition at line 65 of file SpawnAction.cs.

◆ IgnoreByAI

bool Barotrauma.SpawnAction.IgnoreByAI
getset

Definition at line 89 of file SpawnAction.cs.

◆ ItemIdentifier

Identifier Barotrauma.SpawnAction.ItemIdentifier
getset

Definition at line 36 of file SpawnAction.cs.

◆ LootingIsStealing

bool Barotrauma.SpawnAction.LootingIsStealing
getset

Definition at line 33 of file SpawnAction.cs.

◆ NPCIdentifier

Identifier Barotrauma.SpawnAction.NPCIdentifier
getset

Definition at line 30 of file SpawnAction.cs.

◆ NPCSetIdentifier

Identifier Barotrauma.SpawnAction.NPCSetIdentifier
getset

Definition at line 27 of file SpawnAction.cs.

◆ Offset

float Barotrauma.SpawnAction.Offset
getset

Definition at line 68 of file SpawnAction.cs.

◆ RequireSpawnPointTag

bool Barotrauma.SpawnAction.RequireSpawnPointTag
getset

Definition at line 57 of file SpawnAction.cs.

◆ SpawnLocation

SpawnLocationType Barotrauma.SpawnAction.SpawnLocation
getset

Definition at line 45 of file SpawnAction.cs.

◆ SpawnPointTag

Identifier Barotrauma.SpawnAction.SpawnPointTag
getset

Definition at line 51 of file SpawnAction.cs.

◆ SpawnPointType

SpawnType Barotrauma.SpawnAction.SpawnPointType
getset

Definition at line 48 of file SpawnAction.cs.

◆ SpeciesName

Identifier Barotrauma.SpawnAction.SpeciesName
getset

Definition at line 24 of file SpawnAction.cs.

◆ TargetInventory

Identifier Barotrauma.SpawnAction.TargetInventory
getset

Definition at line 42 of file SpawnAction.cs.

◆ TargetModuleTags

string Barotrauma.SpawnAction.TargetModuleTags
getset

Definition at line 71 of file SpawnAction.cs.

◆ TargetTag

Identifier Barotrauma.SpawnAction.TargetTag
getset

Definition at line 39 of file SpawnAction.cs.

◆ TeamID

CharacterTeamType Barotrauma.SpawnAction.TeamID
getprotected set

Definition at line 54 of file SpawnAction.cs.