Barotrauma Server
|
Classes | |
interface | IEntitySpawnInfo |
class | ItemSpawnInfo |
class | RemoveEntity |
class | SpawnEntity |
class | SpawnOrRemove |
Public Member Functions | |
EntitySpawner () | |
override string | ToString () |
void | AddItemToSpawnQueue (ItemPrefab itemPrefab, Vector2 worldPosition, float? condition=null, int? quality=null, Action< Item > onSpawned=null) |
void | AddItemToSpawnQueue (ItemPrefab itemPrefab, Vector2 position, Submarine sub, float? condition=null, int? quality=null, Action< Item > onSpawned=null) |
void | AddItemToSpawnQueue (ItemPrefab itemPrefab, Inventory inventory, float? condition=null, int? quality=null, Action< Item > onSpawned=null, bool spawnIfInventoryFull=true, bool ignoreLimbSlots=false, InvSlotType slot=InvSlotType.None) |
void | AddCharacterToSpawnQueue (Identifier speciesName, Vector2 worldPosition, Action< Character > onSpawn=null) |
void | AddCharacterToSpawnQueue (Identifier speciesName, Vector2 position, Submarine sub, Action< Character > onSpawn=null) |
void | AddCharacterToSpawnQueue (Identifier speciesName, Vector2 worldPosition, CharacterInfo characterInfo, Action< Character > onSpawn=null) |
void | AddEntityToRemoveQueue (Entity entity) |
void | AddItemToRemoveQueue (Item item) |
bool | IsInSpawnQueue (Predicate< IEntitySpawnInfo > predicate) |
Are there any entities in the spawn queue that match the given predicate. | |
int | CountSpawnQueue (Predicate< IEntitySpawnInfo > predicate) |
How many entities in the spawn queue match the given predicate. | |
bool | IsInRemoveQueue (Entity entity) |
void | Update (bool createNetworkEvents=true) |
void | Reset () |
void | CreateNetworkEvent (SpawnOrRemove spawnOrRemove) |
void | ServerEventWrite (IWriteMessage message, Client client, NetEntityEvent.IData extraData=null) |
![]() | |
Entity (Submarine submarine, ushort id) | |
void | FreeID () |
Removes the entity from the entity dictionary and frees up the ID it was using. | |
virtual void | Remove () |
Additional Inherited Members | |
![]() | |
static IReadOnlyCollection< Entity > | GetEntities () |
static int | FindFreeIdBlock (int minBlockSize) |
Finds a contiguous block of free IDs of at least the given size. | |
static Entity | FindEntityByID (ushort ID) |
Find an entity based on the ID. | |
static void | RemoveAll () |
static void | DumpIds (int count, string filename) |
![]() | |
readonly ushort | ID |
Unique, but non-persistent identifier. Stays the same if the entities are created in the exactly same order, but doesn't persist e.g. between the rounds. | |
readonly string | CreationStackTrace |
readonly UInt64 | CreationIndex |
![]() | |
const ushort | NullEntityID = 0 |
const ushort | EntitySpawnerID = ushort.MaxValue |
const ushort | RespawnManagerID = ushort.MaxValue - 1 |
const ushort | DummyID = ushort.MaxValue - 2 |
const ushort | ReservedIDStart = ushort.MaxValue - 3 |
const ushort | MaxEntityCount = ushort.MaxValue - 4 |
static EntitySpawner | Spawner |
![]() | |
virtual ushort | DetermineID (ushort id, Submarine submarine) |
![]() | |
AITarget | aiTarget |
![]() | |
static int | EntityCount [get] |
bool | Removed [get] |
bool | IdFreed [get] |
virtual Vector2 | SimPosition [get] |
virtual Vector2 | Position [get] |
virtual Vector2 | WorldPosition [get] |
virtual Vector2 | DrawPosition [get] |
Submarine | Submarine [get, set] |
AITarget | AiTarget [get] |
bool | InDetectable [get, set] |
Indetectable characters can't be spotted by AIs and aren't visible on the sonar or health scanner. | |
double | SpawnTime [get] |
string | ErrorLine [get] |
![]() |
Barotrauma.EntitySpawner.EntitySpawner | ( | ) |
void Barotrauma.EntitySpawner.AddCharacterToSpawnQueue | ( | Identifier | speciesName, |
Vector2 | position, | ||
Submarine | sub, | ||
Action< Character > | onSpawn = null ) |
void Barotrauma.EntitySpawner.AddCharacterToSpawnQueue | ( | Identifier | speciesName, |
Vector2 | worldPosition, | ||
Action< Character > | onSpawn = null ) |
void Barotrauma.EntitySpawner.AddCharacterToSpawnQueue | ( | Identifier | speciesName, |
Vector2 | worldPosition, | ||
CharacterInfo | characterInfo, | ||
Action< Character > | onSpawn = null ) |
void Barotrauma.EntitySpawner.AddEntityToRemoveQueue | ( | Entity | entity | ) |
void Barotrauma.EntitySpawner.AddItemToRemoveQueue | ( | Item | item | ) |
void Barotrauma.EntitySpawner.AddItemToSpawnQueue | ( | ItemPrefab | itemPrefab, |
Inventory | inventory, | ||
float? | condition = null, | ||
int? | quality = null, | ||
Action< Item > | onSpawned = null, | ||
bool | spawnIfInventoryFull = true, | ||
bool | ignoreLimbSlots = false, | ||
InvSlotType | slot = InvSlotType::None ) |
void Barotrauma.EntitySpawner.AddItemToSpawnQueue | ( | ItemPrefab | itemPrefab, |
Vector2 | position, | ||
Submarine | sub, | ||
float? | condition = null, | ||
int? | quality = null, | ||
Action< Item > | onSpawned = null ) |
void Barotrauma.EntitySpawner.AddItemToSpawnQueue | ( | ItemPrefab | itemPrefab, |
Vector2 | worldPosition, | ||
float? | condition = null, | ||
int? | quality = null, | ||
Action< Item > | onSpawned = null ) |
int Barotrauma.EntitySpawner.CountSpawnQueue | ( | Predicate< IEntitySpawnInfo > | predicate | ) |
How many entities in the spawn queue match the given predicate.
void Barotrauma.EntitySpawner.CreateNetworkEvent | ( | SpawnOrRemove | spawnOrRemove | ) |
bool Barotrauma.EntitySpawner.IsInRemoveQueue | ( | Entity | entity | ) |
bool Barotrauma.EntitySpawner.IsInSpawnQueue | ( | Predicate< IEntitySpawnInfo > | predicate | ) |
Are there any entities in the spawn queue that match the given predicate.
void Barotrauma.EntitySpawner.Reset | ( | ) |
void Barotrauma.EntitySpawner.ServerEventWrite | ( | IWriteMessage | message, |
Client | client, | ||
NetEntityEvent.IData | extraData = null ) |
override string Barotrauma.EntitySpawner.ToString | ( | ) |
void Barotrauma.EntitySpawner.Update | ( | bool | createNetworkEvents = true | ) |