Class Door
A wrapper class for Interactables.Interobjects.DoorUtils.DoorVariant.
Implements
Inherited Members
Namespace: Exiled.API.Features.Doors
Assembly: Exiled.API.dll
Syntax
public class Door : TypeCastObject<Door>, IWrapper<DoorVariant>, IWorldSpace, IPosition, IRotation
Properties
| Improve this Doc View SourceAllowsScp106
Gets or sets a value indicating whether or not SCP-106 can walk through the door.
Declaration
public bool AllowsScp106 { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Base
Gets the base-game Interactables.Interobjects.DoorUtils.DoorVariant corresponding with this door.
Declaration
public DoorVariant Base { get; }
Property Value
Type | Description |
---|---|
Interactables.Interobjects.DoorUtils.DoorVariant |
DoorLockType
Gets or sets the door lock type.
Declaration
public DoorLockType DoorLockType { get; set; }
Property Value
Type | Description |
---|---|
DoorLockType |
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.
Declaration
public float ExactState { get; }
Property Value
Type | Description |
---|---|
System.Single |
GameObject
Gets the door's UnityEngine.GameObject.
Declaration
public GameObject GameObject { get; }
Property Value
Type | Description |
---|---|
UnityEngine.GameObject |
InstanceId
Gets the door's Instance ID.
Declaration
public int InstanceId { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
IsCheckpoint
Gets a value indicating whether or not this door is a checkpoint door.
Declaration
public bool IsCheckpoint { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsConsideredOpen
Gets a value indicating whether the door is considered open by the game.
Declaration
public bool IsConsideredOpen { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsDamageable
Gets a value indicating whether or not this door can be damaged.
Declaration
public bool IsDamageable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsElevator
Gets a value indicating whether or not this door is an elevator door.
Declaration
public bool IsElevator { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsFullyClosed
Gets a value indicating whether or not the door is fully closed.
Declaration
public virtual bool IsFullyClosed { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsFullyOpen
Gets a value indicating whether the door is fully open.
Declaration
public virtual bool IsFullyOpen { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsGate
Gets a value indicating whether or not this door is a gate.
Declaration
public bool IsGate { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsKeycardDoor
Gets a value indicating whether or not this door requires a keycard to open.
Declaration
public bool IsKeycardDoor { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
This value is false if KeycardPermissions is equal to None.
IsLocked
Gets a value indicating whether or not the door is locked.
Declaration
public bool IsLocked { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsMoving
Gets a value indicating whether or not the door is currently moving.
Declaration
public virtual bool IsMoving { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsNonInteractable
Gets a value indicating whether or not this door is non-interactable.
Declaration
public bool IsNonInteractable { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsOpen
Gets or sets a value indicating whether the door is open.
Declaration
public bool IsOpen { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsPartOfCheckpoint
Gets a value indicating whether or not this door is subdoor belonging to a checkpoint.
Declaration
public bool IsPartOfCheckpoint { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
KeycardPermissions
Gets or sets the keycard permissions required to open the door.
Declaration
public KeycardPermissions KeycardPermissions { get; set; }
Property Value
Type | Description |
---|---|
KeycardPermissions |
Remarks
Setting this value to None will allow this door to be opened without a keycard.
List
Declaration
public static IReadOnlyCollection<Door> List { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<Door> |
Name
Gets the name of this door.
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Nametag
Gets a nametag of a door.
Declaration
public DoorNametagExtension Nametag { get; }
Property Value
Type | Description |
---|---|
Interactables.Interobjects.DoorUtils.DoorNametagExtension |
Position
Gets or sets the door's position.
Declaration
public Vector3 Position { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
RequiredPermissions
Gets or sets the required permissions to open the door.
Declaration
public DoorPermissions RequiredPermissions { get; set; }
Property Value
Type | Description |
---|---|
Interactables.Interobjects.DoorUtils.DoorPermissions |
Room
Gets the Room that the door is located in.
Declaration
public Room Room { get; }
Property Value
Type | Description |
---|---|
Room |
Rooms
Gets the Room's that the door is located in.
Declaration
public IReadOnlyCollection<Room> Rooms { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<Room> |
Rotation
Gets or sets the door's rotation.
Declaration
public Quaternion Rotation { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Quaternion |
Scale
Gets or sets the size scale of the door.
Declaration
public Vector3 Scale { get; set; }
Property Value
Type | Description |
---|---|
UnityEngine.Vector3 |
Transform
Gets the door's UnityEngine.Transform.
Declaration
public Transform Transform { get; }
Property Value
Type | Description |
---|---|
UnityEngine.Transform |
Type
Gets the door's DoorType.
Declaration
public DoorType Type { get; }
Property Value
Type | Description |
---|---|
DoorType |
Zone
Gets the door's ZoneType.
Declaration
public ZoneType Zone { get; }
Property Value
Type | Description |
---|---|
ZoneType |
Methods
| Improve this Doc View SourceChangeLock(DoorLockType)
Change the door lock with the given lock type.
Declaration
public void ChangeLock(DoorLockType lockType)
Parameters
Type | Name | Description |
---|---|---|
DoorLockType | lockType | The DoorLockType to use. |
Get(DoorType)
Declaration
public static Door Get(DoorType doorType)
Parameters
Type | Name | Description |
---|---|---|
DoorType | doorType | The DoorType to search for. |
Returns
Type | Description |
---|---|
Door |
Get(DoorVariant)
Gets the door object associated with a specific Interactables.Interobjects.DoorUtils.DoorVariant, or creates a new one if there isn't one.
Declaration
public static Door Get(DoorVariant doorVariant)
Parameters
Type | Name | Description |
---|---|---|
Interactables.Interobjects.DoorUtils.DoorVariant | doorVariant | The base-game Interactables.Interobjects.DoorUtils.DoorVariant. |
Returns
Type | Description |
---|---|
Door | A Door wrapper object. |
Get(Func<Door, Boolean>)
Gets a System.Collections.Generic.IEnumerable<T> of Door filtered based on a predicate.
Declaration
public static IEnumerable<Door> Get(Func<Door, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Door, System.Boolean> | predicate | The condition to satify. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<Door> | A System.Collections.Generic.IEnumerable<T> of Door which contains elements that satify the condition. |
Get(String)
Gets a Door given the specified name.
Declaration
public static Door Get(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name to search for. |
Returns
Type | Description |
---|---|
Door | The Door with the given name or null if not found. |
Get(GameObject)
Gets the door object associated with a specific UnityEngine.GameObject, or creates a new one if there isn't one.
Declaration
public static Door Get(GameObject gameObject)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.GameObject | gameObject | The base-game UnityEngine.GameObject. |
Returns
Type | Description |
---|---|
Door | The Door with the given name or null if not found. |
GetClosest(Vector3, out Single)
Returns the closest Door to the given position
.
Declaration
public static Door GetClosest(Vector3 position, out float distance)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.Vector3 | position | The UnityEngine.Vector3 to find the closest door to. |
System.Single | distance | The distance between the door and the point. |
Returns
Type | Description |
---|---|
Door | The door closest to the provided position. |
IsAllowToInteract(Player)
Checks if specified Player can interact with the door.
Declaration
public bool IsAllowToInteract(Player player = null)
Parameters
Type | Name | Description |
---|---|---|
Player | player | Player to check. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified player can interact with the door. Otherwise, false. |
Lock(Single, DoorLockType)
Locks all active locks on the door, and then reverts back any changes after a specified length of time.
Declaration
public void Lock(float time, DoorLockType lockType)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time | The amount of time that must pass before unlocking the door. |
DoorLockType | lockType | The DoorLockType of the lockdown. |
LockAll(Single, DoorLockType)
Locks all doors in the facility.
Declaration
public static void LockAll(float duration, DoorLockType lockType = DoorLockType.Regular079)
Parameters
Type | Name | Description |
---|---|---|
System.Single | duration | The duration of the lockdown. |
DoorLockType | lockType | The specified DoorLockType. |
LockAll(Single, ZoneType, DoorLockType)
Declaration
public static void LockAll(float duration, ZoneType zoneType = ZoneType.Unspecified, DoorLockType lockType = DoorLockType.Regular079)
Parameters
Type | Name | Description |
---|---|---|
System.Single | duration | The duration of the lockdown. |
ZoneType | zoneType | The ZoneType to affect. |
DoorLockType | lockType | The specified DoorLockType. |
LockAll(Single, IEnumerable<ZoneType>, DoorLockType)
Declaration
public static void LockAll(float duration, IEnumerable<ZoneType> zoneTypes, DoorLockType lockType = DoorLockType.Regular079)
Parameters
Type | Name | Description |
---|---|---|
System.Single | duration | The duration of the lockdown. |
System.Collections.Generic.IEnumerable<ZoneType> | zoneTypes | The ZoneTypes to affect. |
DoorLockType | lockType | The specified DoorLockType. |
PlaySound(DoorBeepType)
Makes the door play a beep sound.
Declaration
public void PlaySound(DoorBeepType beep)
Parameters
Type | Name | Description |
---|---|---|
DoorBeepType | beep | The beep sound to play. |
Random(ZoneType, Boolean)
Gets a random Door.
Declaration
public static Door Random(ZoneType type = ZoneType.Unspecified, bool onlyUnbroken = false)
Parameters
Type | Name | Description |
---|---|---|
ZoneType | type | Filters by ZoneType. |
System.Boolean | onlyUnbroken | A value indicating whether it filters broken doors. |
Returns
Type | Description |
---|---|
Door | Door object. |
ToString()
Returns the Door in a human-readable format.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A string containing Door-related data. |
Overrides
Unlock()
Unlocks and clears all active locks on the door.
Declaration
public void Unlock()
Unlock(Single, DoorLockType)
Unlocks and clears all active locks on the door after a specified length of time.
Declaration
public void Unlock(float time, DoorLockType flagsToUnlock)
Parameters
Type | Name | Description |
---|---|---|
System.Single | time | The amount of time that must pass before unlocking the door. |
DoorLockType | flagsToUnlock | The DoorLockType of the lockdown. |
UnlockAll()
Unlocks all doors in the facility.
Declaration
public static void UnlockAll()
UnlockAll(ZoneType)
Unlocks all doors in the facility.
Declaration
public static void UnlockAll(ZoneType zoneType)
Parameters
Type | Name | Description |
---|---|---|
ZoneType | zoneType | The ZoneType to affect. |
UnlockAll(IEnumerable<ZoneType>)
Unlocks all doors in the facility.
Declaration
public static void UnlockAll(IEnumerable<ZoneType> zoneTypes)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<ZoneType> | zoneTypes | The ZoneTypes to affect. |
UnlockAll(Func<Door, Boolean>)
Unlocks all doors in the facility.
Declaration
public static void UnlockAll(Func<Door, bool> predicate)
Parameters
Type | Name | Description |
---|---|---|
System.Func<Door, System.Boolean> | predicate | The condition to satify. |