Class Door
A wrapper class for Interactables.Interobjects.DoorUtils.DoorVariant.
public class Door : TypeCastObject<Door>, IWrapper<DoorVariant>, IWorldSpace, IPosition, IRotation
- Inheritance
-
Door
- Implements
-
IWrapper<DoorVariant>
- Derived
- Inherited Members
- Extension Methods
Properties
AllowsScp106
Gets or sets a value indicating whether SCP-106 can walk through the door.
public bool AllowsScp106 { get; set; }
Property Value
Base
Gets the base-game Interactables.Interobjects.DoorUtils.DoorVariant corresponding with this door.
public DoorVariant Base { get; }
Property Value
- DoorVariant
DoorLockType
Gets or sets the door lock type.
public DoorLockType DoorLockType { get; set; }
Property Value
ExactState
Gets a value indicating the precise state of the door, from 0-1
. A value of 0
indicates the door is fully closed, while a value of 1
indicates the door is fully open. Values in-between represent the door's animation progress.
public float ExactState { get; }
Property Value
GameObject
Gets the door's UnityEngine.GameObject.
public GameObject GameObject { get; }
Property Value
- GameObject
InstanceId
Gets the door's Instance ID.
public int InstanceId { get; }
Property Value
IsCheckpoint
Gets a value indicating whether this door is a checkpoint door.
public bool IsCheckpoint { get; }
Property Value
IsConsideredOpen
Gets a value indicating whether the door is considered open by the game.
public bool IsConsideredOpen { get; }
Property Value
IsDamageable
Gets a value indicating whether this door can be damaged.
public bool IsDamageable { get; }
Property Value
IsElevator
Gets a value indicating whether this door is an elevator door.
public bool IsElevator { get; }
Property Value
IsFullyClosed
Gets a value indicating whether the door is fully closed.
public virtual bool IsFullyClosed { get; }
Property Value
IsFullyOpen
Gets a value indicating whether the door is fully open.
public virtual bool IsFullyOpen { get; }
Property Value
IsGate
Gets a value indicating whether this door is a gate.
public bool IsGate { get; }
Property Value
IsKeycardDoor
Gets a value indicating whether this door requires a keycard to open.
public bool IsKeycardDoor { get; }
Property Value
Remarks
This value is false if KeycardPermissions is equal to None.
IsLocked
Gets a value indicating whether the door is locked.
public bool IsLocked { get; }
Property Value
IsMoving
Gets a value indicating whether the door is currently moving.
public virtual bool IsMoving { get; }
Property Value
IsNonInteractable
Gets a value indicating whether this door is non-interactable.
public bool IsNonInteractable { get; }
Property Value
IsOpen
Gets or sets a value indicating whether the door is open.
public bool IsOpen { get; set; }
Property Value
IsPartOfCheckpoint
Gets a value indicating whether this door is subdoor belonging to a checkpoint.
public bool IsPartOfCheckpoint { get; }
Property Value
KeycardPermissions
Gets or sets the keycard permissions required to open the door.
public KeycardPermissions KeycardPermissions { get; set; }
Property Value
Remarks
Setting this value to None will allow this door to be opened without a keycard.
List
Gets a IEnumerable<T> of Door which contains all the Door instances.
public static IReadOnlyCollection<Door> List { get; }
Property Value
Name
Gets the name of this door.
public string Name { get; }
Property Value
Nametag
Gets a nametag of a door.
public DoorNametagExtension Nametag { get; }
Property Value
- DoorNametagExtension
ParentCheckpointDoor
Gets the checkpoint door the door is belonging to, or null if the door doesn't belong to a checkpoint.
public CheckpointDoor ParentCheckpointDoor { get; }
Property Value
Position
Gets or sets the door's position.
public Vector3 Position { get; set; }
Property Value
- Vector3
RequiredPermissions
Gets or sets the required permissions to open the door.
public DoorPermissions RequiredPermissions { get; set; }
Property Value
- DoorPermissions
Room
Gets the Room that the door is located in.
public Room Room { get; }
Property Value
Rooms
Gets the Room's that the door is located in.
public IReadOnlyCollection<Room> Rooms { get; }
Property Value
Rotation
Gets or sets the door's rotation.
public Quaternion Rotation { get; set; }
Property Value
- Quaternion
Scale
Gets or sets the size scale of the door.
public Vector3 Scale { get; set; }
Property Value
- Vector3
Transform
Gets the door's UnityEngine.Transform.
public Transform Transform { get; }
Property Value
- Transform
Type
Gets the door's DoorType.
public DoorType Type { get; }
Property Value
Zone
Gets the door's ZoneType.
public ZoneType Zone { get; }
Property Value
Methods
ChangeLock(DoorLockType)
Change the door lock with the given lock type.
public void ChangeLock(DoorLockType lockType)
Parameters
lockType
DoorLockTypeThe DoorLockType to use.
Get(DoorType)
public static Door Get(DoorType doorType)
Parameters
Returns
Get(DoorVariant)
Gets the door object associated with a specific Interactables.Interobjects.DoorUtils.DoorVariant, or creates a new one if there isn't one.
public static Door Get(DoorVariant doorVariant)
Parameters
doorVariant
DoorVariantThe base-game Interactables.Interobjects.DoorUtils.DoorVariant.
Returns
Get(Func<Door, bool>)
Gets a IEnumerable<T> of Door filtered based on a predicate.
public static IEnumerable<Door> Get(Func<Door, bool> predicate)
Parameters
Returns
- IEnumerable<Door>
A IEnumerable<T> of Door which contains elements that satify the condition.
Get(string)
Gets a Door given the specified name.
public static Door Get(string name)
Parameters
name
stringThe name to search for.
Returns
Get(GameObject)
Gets the door object associated with a specific UnityEngine.GameObject, or creates a new one if there isn't one.
public static Door Get(GameObject gameObject)
Parameters
gameObject
GameObjectThe base-game UnityEngine.GameObject.
Returns
GetClosest(Vector3, out float)
Returns the closest Door to the given position
.
public static Door GetClosest(Vector3 position, out float distance)
Parameters
position
Vector3The position to find the closest door to.
distance
floatThe distance between the door and the point.
Returns
- Door
The door closest to the provided position.
Get<T>(DoorType)
Gets the Door by Interactables.Interobjects.DoorUtils.DoorVariant.
public static T Get<T>(DoorType doorType) where T : Door
Parameters
doorType
DoorTypeThe Interactables.Interobjects.DoorUtils.DoorVariant to convert into an door.
Returns
- T
The door wrapper for the given Interactables.Interobjects.DoorUtils.DoorVariant.
Type Parameters
T
The specified Door type.
Get<T>(DoorVariant)
Gets the Door by Interactables.Interobjects.DoorUtils.DoorVariant.
public static T Get<T>(DoorVariant doorVariant) where T : Door
Parameters
doorVariant
DoorVariantThe Interactables.Interobjects.DoorUtils.DoorVariant to convert into an door.
Returns
- T
The door wrapper for the given Interactables.Interobjects.DoorUtils.DoorVariant.
Type Parameters
T
The specified Door type.
Get<T>(string)
Gets the Door by Interactables.Interobjects.DoorUtils.DoorVariant.
public static T Get<T>(string name) where T : Door
Parameters
name
stringThe name to search for.
Returns
- T
The door wrapper for the given Interactables.Interobjects.DoorUtils.DoorVariant.
Type Parameters
T
The specified Door type.
IsAllowToInteract(Player)
Checks if specified Player can interact with the door.
public bool IsAllowToInteract(Player player = null)
Parameters
player
PlayerPlayer to check.
Returns
Lock(DoorLockType)
Locks all active locks on the door for infinite time.
public void Lock(DoorLockType lockType)
Parameters
lockType
DoorLockTypeThe DoorLockType of the lockdown.
Lock(float, DoorLockType)
Locks all active locks on the door, and then reverts back any changes after a specified length of time.
public void Lock(float time, DoorLockType lockType)
Parameters
time
floatThe amount of time that must pass before unlocking the door.
lockType
DoorLockTypeThe DoorLockType of the lockdown.
LockAll(float, DoorLockType)
Locks all doors in the facility.
public static void LockAll(float duration, DoorLockType lockType = DoorLockType.Regular079)
Parameters
duration
floatThe duration of the lockdown.
lockType
DoorLockTypeThe specified DoorLockType.
LockAll(float, ZoneType, DoorLockType)
public static void LockAll(float duration, ZoneType zoneType = ZoneType.Unspecified, DoorLockType lockType = DoorLockType.Regular079)
Parameters
duration
floatThe duration of the lockdown.
zoneType
ZoneTypeThe ZoneType to affect.
lockType
DoorLockTypeThe specified DoorLockType.
LockAll(float, IEnumerable<ZoneType>, DoorLockType)
public static void LockAll(float duration, IEnumerable<ZoneType> zoneTypes, DoorLockType lockType = DoorLockType.Regular079)
Parameters
duration
floatThe duration of the lockdown.
zoneTypes
IEnumerable<ZoneType>The ZoneTypes to affect.
lockType
DoorLockTypeThe specified DoorLockType.
PlaySound(DoorBeepType)
Makes the door play a beep sound.
public void PlaySound(DoorBeepType beep)
Parameters
beep
DoorBeepTypeThe beep sound to play.
Random(ZoneType, bool)
Gets a random Door.
public static Door Random(ZoneType type = ZoneType.Unspecified, bool onlyUnbroken = false)
Parameters
type
ZoneTypeFilters by ZoneType.
onlyUnbroken
boolA value indicating whether it filters broken doors.
Returns
ToString()
Returns the Door in a human-readable format.
public override string ToString()
Returns
- string
A string containing Door-related data.
Unlock()
Unlocks and clears all active locks on the door.
public void Unlock()
Unlock(float, DoorLockType)
Unlocks and clears all active locks on the door after a specified length of time.
public void Unlock(float time, DoorLockType flagsToUnlock)
Parameters
time
floatThe amount of time that must pass before unlocking the door.
flagsToUnlock
DoorLockTypeThe DoorLockType of the lockdown.
UnlockAll()
Unlocks all doors in the facility.
public static void UnlockAll()
UnlockAll(ZoneType)
Unlocks all doors in the facility.
public static void UnlockAll(ZoneType zoneType)
Parameters
UnlockAll(IEnumerable<ZoneType>)
Unlocks all doors in the facility.
public static void UnlockAll(IEnumerable<ZoneType> zoneTypes)
Parameters
zoneTypes
IEnumerable<ZoneType>The ZoneTypes to affect.
UnlockAll(Func<Door, bool>)
Unlocks all doors in the facility.
public static void UnlockAll(Func<Door, bool> predicate)