Class StationSpawningSystem
Manages spawning into the game, tracking available spawn points. Also provides helpers for spawning in the player's mob.
Namespace: Content.Server.Station.Systems
Assembly: Content.Server.dll
Syntax
public sealed class StationSpawningSystem : SharedStationSpawningSystem
Methods
| Improve this Doc View SourceEquipIdCard(EntityUid, String, JobPrototype, Nullable<EntityUid>)
Equips an ID card and PDA onto the given entity.
Declaration
public void EquipIdCard(EntityUid entity, string characterName, JobPrototype jobPrototype, EntityUid? station)
Parameters
Type | Name | Description |
---|---|---|
EntityUid | entity | Entity to load out. |
System.String | characterName | Character name to use for the ID. |
JobPrototype | jobPrototype | Job prototype to use for the PDA and ID. |
System.Nullable<EntityUid> | station | The station this player is being spawned on. |
Initialize()
Declaration
public override void Initialize()
SpawnPlayerCharacterOnStation(Nullable<EntityUid>, JobComponent, HumanoidCharacterProfile, StationSpawningComponent)
Attempts to spawn a player character onto the given station.
Declaration
public EntityUid? SpawnPlayerCharacterOnStation(EntityUid? station, JobComponent job, HumanoidCharacterProfile profile, StationSpawningComponent stationSpawning = null)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<EntityUid> | station | Station to spawn onto. |
JobComponent | job | The job to assign, if any. |
HumanoidCharacterProfile | profile | The character profile to use, if any. |
StationSpawningComponent | stationSpawning | Resolve pattern, the station spawning component for the station. |
Returns
Type | Description |
---|---|
System.Nullable<EntityUid> | The resulting player character, if any. |
Remarks
This only spawns the character, and does none of the mind-related setup you'd need for it to be playable.
SpawnPlayerMob(EntityCoordinates, JobComponent, HumanoidCharacterProfile, Nullable<EntityUid>, Nullable<EntityUid>)
Spawns in a player's mob according to their job and character information at the given coordinates. Used by systems that need to handle spawning players.
Declaration
public EntityUid SpawnPlayerMob(EntityCoordinates coordinates, JobComponent job, HumanoidCharacterProfile profile, EntityUid? station, EntityUid? entity = null)
Parameters
Type | Name | Description |
---|---|---|
Robust.Shared.Map.EntityCoordinates | coordinates | Coordinates to spawn the character at. |
JobComponent | job | Job to assign to the character, if any. |
HumanoidCharacterProfile | profile | Appearance profile to use for the character. |
System.Nullable<EntityUid> | station | The station this player is being spawned on. |
System.Nullable<EntityUid> | entity | The entity to use, if one already exists. |
Returns
Type | Description |
---|---|
EntityUid | The spawned entity |