Skip to main content

DoorObject

class ThaumielMapEditor.API.Blocks.ServerObjects

Overview​

Properties​

NameTypeAccessDescription
BaseDoorVariantgetReference to the underlying game Interactables.Interobjects.DoorUtils.DoorVariant object.
Bypass2176boolget setIf true, SCP-2176 can bypass this door's permissions. Syncs to the live door object when changed after spawning.
DoorTypeDoorTypeget setThe visual and functional type of this door.
Healthfloatget setThe current remaining health of this door. Only applies to doors that extend Interactables.Interobjects.BreakableDoor. Silently ignored for non-breakable door types. Syncs to the live door object when changed after spawning.
IsLockedboolget setWhether the door is locked via admin command. Syncs to the live door object when changed after spawning.
IsOpenboolget setWhether the door is currently open.
MaxHealthfloatget setThe maximum health of this door. Only applies to doors that extend Interactables.Interobjects.BreakableDoor. Silently ignored for non-breakable door types. Syncs to the live door object when changed after spawning.
ObjectTypeObjectTypeget setThe object type identifier for this server object. Always ThaumielMapEditor.API.Enums.ObjectType.Door.
PermissionsDoorPermissionFlagsget setThe keycard permission flags required to interact with this door. Syncs to the live door object when changed after spawning.
RequireAllPermissionsboolget setIf true, the player must hold all listed permissions rather than just one. Syncs to the live door object when changed after spawning.

Methods​

SignatureReturnsDescription
ApplyProperties(GameObject)voidApplies all current property values to the given door prefab `UnityEngine.GameOb…
GetDoorFromType(DoorType)DoorVariantReturns the Interactables.Interobjects.DoorUtils.DoorVariant prefab that corre…
ParseValues(SerializableObject)voidReads and parses all door properties from the provided `ThaumielMapEditor.API.Se…
SpawnObject(SchematicData, SerializableObject)voidSpawns the specified ThaumielMapEditor.API.Blocks.ServerObject into the server…
SpawnObject(SchematicData)voidNo description
ToString()stringReturns a string representation of this door object's current state.

Properties​

Base​

Type: DoorVariant Access: get

Reference to the underlying game Interactables.Interobjects.DoorUtils.DoorVariant object.


Bypass2176​

Type: bool Access: get set

If true, SCP-2176 can bypass this door's permissions. Syncs to the live door object when changed after spawning.


DoorType​

Type: DoorType Access: get set

The visual and functional type of this door.


Health​

Type: float Access: get set

The current remaining health of this door. Only applies to doors that extend Interactables.Interobjects.BreakableDoor. Silently ignored for non-breakable door types. Syncs to the live door object when changed after spawning.


IsLocked​

Type: bool Access: get set

Whether the door is locked via admin command. Syncs to the live door object when changed after spawning.


IsOpen​

Type: bool Access: get set

Whether the door is currently open.


MaxHealth​

Type: float Access: get set

The maximum health of this door. Only applies to doors that extend Interactables.Interobjects.BreakableDoor. Silently ignored for non-breakable door types. Syncs to the live door object when changed after spawning.


ObjectType​

Type: ObjectType Access: get set

The object type identifier for this server object. Always ThaumielMapEditor.API.Enums.ObjectType.Door.


Permissions​

Type: DoorPermissionFlags Access: get set

The keycard permission flags required to interact with this door. Syncs to the live door object when changed after spawning.


RequireAllPermissions​

Type: bool Access: get set

If true, the player must hold all listed permissions rather than just one. Syncs to the live door object when changed after spawning.


Methods​

ApplyProperties​

ApplyProperties
public void ApplyProperties(GameObject prefab)

Applies all current property values to the given door prefab UnityEngine.GameObject. This includes health, lock state, open state, and permissions. Called internally during ThaumielMapEditor.API.Blocks.ServerObjects.DoorObject.SpawnObject(ThaumielMapEditor.API.Data.SchematicData,ThaumielMapEditor.API.Serialization.SerializableObject).

Parameters​

NameTypeDescription
prefabGameObjectThe door prefab UnityEngine.GameObject to apply properties to.

GetDoorFromType​

GetDoorFromType
public DoorVariant GetDoorFromType(DoorType type)

Returns the Interactables.Interobjects.DoorUtils.DoorVariant prefab that corresponds to the given ThaumielMapEditor.API.Blocks.ServerObjects.DoorObject.DoorType.

Parameters​

NameTypeDescription
typeDoorTypeThe door type to look up.

Returns​

DoorVariant β€” The matching Interactables.Interobjects.DoorUtils.DoorVariant prefab, or null if not found.

Exceptions​

warning
  • ``System.ArgumentOutOfRangeExceptionβ€” Thrown whentype does not match any known door type.

ParseValues​

ParseValues
public void ParseValues(SerializableObject serializable)

Reads and parses all door properties from the provided ThaumielMapEditor.API.Serialization.SerializableObject. Logs a warning and returns early if the object type is incorrect or any field fails to parse.

Parameters​

NameTypeDescription
serializableSerializableObjectThe serializable object containing a Values dictionary with door property data. Expected keys: DoorType, Permissions, RequireAllPermissions, Bypass2176, MaxHealth, Health, IsOpen, IsLocked.

SpawnObject​

SpawnObject
public void SpawnObject(
SchematicData schematic,
SerializableObject serializable
)

Spawns the specified ThaumielMapEditor.API.Blocks.ServerObject into the server and adds it to the provided ThaumielMapEditor.API.Data.SchematicData's ThaumielMapEditor.API.Data.SchematicData.SpawnedServerObjects list.

Parameters​

NameTypeDescription
schematicSchematicData
serializableSerializableObject

SpawnObject​

SpawnObject
public void SpawnObject(SchematicData schematic)

Parameters​

NameTypeDescription
schematicSchematicData

ToString​

ToString
public string ToString()

Returns a string representation of this door object's current state.

Returns​

string β€” A formatted string listing all key property values.