DoorObject
ThaumielMapEditor.API.Blocks.ServerObjects
Overviewβ
Propertiesβ
| Name | Type | Access | Description |
|---|---|---|---|
Base | DoorVariant | get | Reference to the underlying game Interactables.Interobjects.DoorUtils.DoorVariant object. |
Bypass2176 | bool | get set | If true, SCP-2176 can bypass this door's permissions. Syncs to the live door object when changed after spawning. |
DoorType | DoorType | get set | The visual and functional type of this door. |
Health | float | 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 | bool | get set | Whether the door is locked via admin command. Syncs to the live door object when changed after spawning. |
IsOpen | bool | get set | Whether the door is currently open. |
MaxHealth | float | 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 | ObjectType | get set | The object type identifier for this server object. Always ThaumielMapEditor.API.Enums.ObjectType.Door. |
Permissions | DoorPermissionFlags | get set | The keycard permission flags required to interact with this door. Syncs to the live door object when changed after spawning. |
RequireAllPermissions | bool | 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β
| Signature | Returns | Description |
|---|---|---|
ApplyProperties(GameObject) | void | Applies all current property values to the given door prefab `UnityEngine.GameOb⦠|
GetDoorFromType(DoorType) | DoorVariant | Returns the Interactables.Interobjects.DoorUtils.DoorVariant prefab that corre⦠|
ParseValues(SerializableObject) | void | Reads and parses all door properties from the provided `ThaumielMapEditor.API.Se⦠|
SpawnObject(SchematicData, SerializableObject) | void | Spawns the specified ThaumielMapEditor.API.Blocks.ServerObject into the server⦠|
SpawnObject(SchematicData) | void | No description |
ToString() | string | Returns 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β
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β
| Name | Type | Description |
|---|---|---|
prefab | GameObject | The door prefab UnityEngine.GameObject to apply properties to. |
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β
| Name | Type | Description |
|---|---|---|
type | DoorType | The door type to look up. |
Returnsβ
DoorVariant β The matching Interactables.Interobjects.DoorUtils.DoorVariant prefab, or null if not found.
Exceptionsβ
- ``System.ArgumentOutOfRangeException
β Thrown whentypedoes not match any known door type.
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β
| Name | Type | Description |
|---|---|---|
serializable | SerializableObject | The serializable object containing a Values dictionary with door property data. Expected keys: DoorType, Permissions, RequireAllPermissions, Bypass2176, MaxHealth, Health, IsOpen, IsLocked. |
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β
| Name | Type | Description |
|---|---|---|
schematic | SchematicData | |
serializable | SerializableObject |
SpawnObjectβ
public void SpawnObject(SchematicData schematic)
Parametersβ
| Name | Type | Description |
|---|---|---|
schematic | SchematicData |
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.