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

Spawns an entity (e.g. item, NPC, monster). More...

Inheritance diagram for Barotrauma.SpawnAction:
Barotrauma.EventAction

Public Types

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

Public Member Functions

 SpawnAction (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 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)
 
string GetEventDebugName ()
 

Detailed Description

Spawns an entity (e.g. item, NPC, monster).

Member Enumeration Documentation

◆ SpawnLocationType

Enumerator
Any 
MainSub 
Outpost 
MainPath 
Ruin 
Wreck 
BeaconStation 
NearMainSub 

Constructor & Destructor Documentation

◆ SpawnAction()

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

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

◆ IsFinished()

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

◆ OffsetSpawnPos()

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

◆ Reset()

override void Barotrauma.SpawnAction.Reset ( )

◆ 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:509
Returns

Reimplemented from Barotrauma.EventAction.

◆ Update()

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

Reimplemented from Barotrauma.EventAction.

Property Documentation

◆ AllowDuplicates

bool Barotrauma.SpawnAction.AllowDuplicates
getset

◆ AllowInPlayerView

bool Barotrauma.SpawnAction.AllowInPlayerView
getset

◆ Amount

int Barotrauma.SpawnAction.Amount
getset

◆ IgnoreByAI

bool Barotrauma.SpawnAction.IgnoreByAI
getset

◆ ItemIdentifier

Identifier Barotrauma.SpawnAction.ItemIdentifier
getset

◆ LootingIsStealing

bool Barotrauma.SpawnAction.LootingIsStealing
getset

◆ NPCIdentifier

Identifier Barotrauma.SpawnAction.NPCIdentifier
getset

◆ NPCSetIdentifier

Identifier Barotrauma.SpawnAction.NPCSetIdentifier
getset

◆ Offset

float Barotrauma.SpawnAction.Offset
getset

◆ RequireSpawnPointTag

bool Barotrauma.SpawnAction.RequireSpawnPointTag
getset

◆ SpawnLocation

SpawnLocationType Barotrauma.SpawnAction.SpawnLocation
getset

◆ SpawnPointTag

Identifier Barotrauma.SpawnAction.SpawnPointTag
getset

◆ SpawnPointType

SpawnType Barotrauma.SpawnAction.SpawnPointType
getset

◆ SpeciesName

Identifier Barotrauma.SpawnAction.SpeciesName
getset

◆ TargetInventory

Identifier Barotrauma.SpawnAction.TargetInventory
getset

◆ TargetModuleTags

string Barotrauma.SpawnAction.TargetModuleTags
getset

◆ TargetTag

Identifier Barotrauma.SpawnAction.TargetTag
getset

◆ TeamID

CharacterTeamType Barotrauma.SpawnAction.TeamID
getprotected set

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