Doors

Handles ownership of doors and locking, etc.

Functions

eMeta:DoorLock()

View source »

Fires the "Lock" event to a door.

eMeta:DoorUnlock()

View source »

Fires the "Unlock" event to a door, for func_doors this function opens them.

eMeta:GetDoorMaster()

View source »

Gives you the owner of the door, this person has access to locking, unlocking, storage, and can grant additional access to others.

Returns

  • player

    Door master, will be nil if nobody owns the door.

eMeta:IsDoorFullyOpen()

View source »

Returns whether the door is fully open or not.

Returns

  • bool

    Door open state.

eMeta:IsDoorOpen()

View source »

Returns whether the door is open or not.

Returns

  • bool

    Door open state.

impulse.Doors.Load()

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Loads door configuration from file.

impulse.Doors.Save()

Internal

This is an internal function! You are able to use it, but you risk unintended side effects if used incorrectly.

View source »

Saves the current door configuration to data. This is a crucial file to upload on your live server since without it, you will have every door be ownable.

Player:RemoveDoorMaster(door, noUnlock)

View source »

Removes the player as the owner of a door.

Parameters

  • door Entity

    The door that the player will be removed from as the owner.

  • noUnlock boolean optional

    If true, the door will not be unlocked.

Player:RemoveDoorUser(door)

View source »

Removes user access from a door.

Parameters

  • door Entity

    The door to remove them from.

Player:SetDoorMaster(door)

View source »

Works different to the Entity:GetDoorMaster since this runs off of the player. This makes the player own the door.

Parameters

  • door Entity

    The door the player will own.

Player:SetDoorUser(door)

View source »

Makes the person able to use a door, use any storage linked, but they cannot manage other users of the door.

Parameters

  • door Entity

    The door they will become a user of.