Table of Contents

Class Door

Namespace
Exiled.API.Features.Doors
Assembly
Exiled.API.dll

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

bool

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

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.

public float ExactState { get; }

Property Value

float

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

int

IsCheckpoint

Gets a value indicating whether this door is a checkpoint door.

public bool IsCheckpoint { get; }

Property Value

bool

IsConsideredOpen

Gets a value indicating whether the door is considered open by the game.

public bool IsConsideredOpen { get; }

Property Value

bool

IsDamageable

Gets a value indicating whether this door can be damaged.

public bool IsDamageable { get; }

Property Value

bool

IsElevator

Gets a value indicating whether this door is an elevator door.

public bool IsElevator { get; }

Property Value

bool

IsFullyClosed

Gets a value indicating whether the door is fully closed.

public virtual bool IsFullyClosed { get; }

Property Value

bool

IsFullyOpen

Gets a value indicating whether the door is fully open.

public virtual bool IsFullyOpen { get; }

Property Value

bool

IsGate

Gets a value indicating whether this door is a gate.

public bool IsGate { get; }

Property Value

bool

IsKeycardDoor

Gets a value indicating whether this door requires a keycard to open.

public bool IsKeycardDoor { get; }

Property Value

bool

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

bool

IsMoving

Gets a value indicating whether the door is currently moving.

public virtual bool IsMoving { get; }

Property Value

bool

IsNonInteractable

Gets a value indicating whether this door is non-interactable.

public bool IsNonInteractable { get; }

Property Value

bool

IsOpen

Gets or sets a value indicating whether the door is open.

public bool IsOpen { get; set; }

Property Value

bool

IsPartOfCheckpoint

Gets a value indicating whether this door is subdoor belonging to a checkpoint.

public bool IsPartOfCheckpoint { get; }

Property Value

bool

KeycardPermissions

Gets or sets the keycard permissions required to open the door.

public KeycardPermissions KeycardPermissions { get; set; }

Property Value

KeycardPermissions

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

IReadOnlyCollection<Door>

Name

Gets the name of this door.

public string Name { get; }

Property Value

string

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

CheckpointDoor

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

Room

Rooms

Gets the Room's that the door is located in.

public IReadOnlyCollection<Room> Rooms { get; }

Property Value

IReadOnlyCollection<Room>

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

DoorType

Zone

Gets the door's ZoneType.

public ZoneType Zone { get; }

Property Value

ZoneType

Methods

ChangeLock(DoorLockType)

Change the door lock with the given lock type.

public void ChangeLock(DoorLockType lockType)

Parameters

lockType DoorLockType

The DoorLockType to use.

Get(DoorType)

Gets a Door given the specified DoorType.

public static Door Get(DoorType doorType)

Parameters

doorType DoorType

The DoorType to search for.

Returns

Door

The Door with the given DoorType or null if not found.

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 DoorVariant

The base-game Interactables.Interobjects.DoorUtils.DoorVariant.

Returns

Door

A Door wrapper object.

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

predicate Func<Door, bool>

The condition to satify.

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 string

The name to search for.

Returns

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.

public static Door Get(GameObject gameObject)

Parameters

gameObject GameObject

The base-game UnityEngine.GameObject.

Returns

Door

The Door with the given name or null if not found.

GetClosest(Vector3, out float)

Returns the closest Door to the given position.

public static Door GetClosest(Vector3 position, out float distance)

Parameters

position Vector3

The position to find the closest door to.

distance float

The 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 DoorType

The 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 DoorVariant

The 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 string

The 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 Player

Player to check.

Returns

bool

true if the specified player can interact with the door. Otherwise, false.

Lock(DoorLockType)

Locks all active locks on the door for infinite time.

public void Lock(DoorLockType lockType)

Parameters

lockType DoorLockType

The 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 float

The amount of time that must pass before unlocking the door.

lockType DoorLockType

The 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 float

The duration of the lockdown.

lockType DoorLockType

The specified DoorLockType.

LockAll(float, ZoneType, DoorLockType)

Locks all doors given the specified ZoneType.

public static void LockAll(float duration, ZoneType zoneType = ZoneType.Unspecified, DoorLockType lockType = DoorLockType.Regular079)

Parameters

duration float

The duration of the lockdown.

zoneType ZoneType

The ZoneType to affect.

lockType DoorLockType

The specified DoorLockType.

LockAll(float, IEnumerable<ZoneType>, DoorLockType)

Locks all doors given the specified ZoneType.

public static void LockAll(float duration, IEnumerable<ZoneType> zoneTypes, DoorLockType lockType = DoorLockType.Regular079)

Parameters

duration float

The duration of the lockdown.

zoneTypes IEnumerable<ZoneType>

The ZoneTypes to affect.

lockType DoorLockType

The specified DoorLockType.

PlaySound(DoorBeepType)

Makes the door play a beep sound.

public void PlaySound(DoorBeepType beep)

Parameters

beep DoorBeepType

The beep sound to play.

Random(ZoneType, bool)

Gets a random Door.

public static Door Random(ZoneType type = ZoneType.Unspecified, bool onlyUnbroken = false)

Parameters

type ZoneType

Filters by ZoneType.

onlyUnbroken bool

A value indicating whether it filters broken doors.

Returns

Door

Door object.

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 float

The amount of time that must pass before unlocking the door.

flagsToUnlock DoorLockType

The 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

zoneType ZoneType

The ZoneType to affect.

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)

Parameters

predicate Func<Door, bool>

The condition to satify.