core.plugins.doors.sh_init
Door Shared
- Sharedcityrp.door.blowDoor(entity, breachpos)Source ☍
-
Blows open a door or forces passengers from a vehicle.
Parameters
- Sharedcityrp.door.getLinkedDoor(door) → Entity?Source ☍
-
Return the paired door entity for a double-door setup, if one exists.
Parameters
- doorEntityDoor whose paired leaf should be resolved.
Returns
- Entity?Paired door leaf, or nil when none exists.
- Sharedcityrp.door.getOwner(door) → Player?Source ☍
-
Resolves the owning player of a door, following the property's main door. Vacating sets the owner to the world entity, so this checks for a player.
Parameters
- doorEntityThe door to resolve the owner of.
Returns
- Player?The owning player, or nil when unowned.
- Sharedcityrp.door.hasLockAccess(ply, door) → booleanSource ☍
-
Client-safe check for whether a player can lock or unlock a door.
Parameters
Returns
- booleanTrue when the player may lock or unlock the door.
- Sharedcityrp.door.isDoor(ent) → booleanSource ☍
-
Returns whether an entity is a supported door type.
Parameters
- entEntityEntity to check.
Returns
- booleanTrue when the entity is a supported door.
- Sharedcityrp.door.isLocked(ent) → booleanSource ☍
-
Returns whether a door is currently locked.
Parameters
- entEntityThe door entity to check.
Returns
- booleanTrue when the door is locked.
- Sharedcityrp.door.openDoor(ent, delay, unlock, sound)Source ☍
-
Opens a door after an optional forced unlock.
Parameters
- entEntityDoor to open.
- delaynumberTime to wait before opening.
- unlockboolean?Whether the door should be force-unlocked.
- soundboolean?Whether an impact sound should be played.
- Sharedcityrp.door.pickDoor(ent, ply, sound)Source ☍
-
Unlocks a door or vehicle after a successful lockpick.
Parameters
- Sharedcityrp.door.ramDoor(ent, ply, sound)Source ☍
-
Rams a door open.
Parameters
- Sharedcityrp.door.setLocked(door, locked, delay)Source ☍
-
Lock or unlock a door and network the new state to clients. The lock state is read on the client for look-at hints, so every lock change has to go through here instead of firing the input directly, otherwise the hint gets stuck on whatever the last networked state was.
Parameters
- doorEntityThe door to lock or unlock.
- lockedbooleanTrue to lock the door, false to unlock it.
- delaynumber?Seconds to wait before the input fires. Defaults to 0.
- Sharedcityrp.doorSource ☍
- Sharedcityrp.door.brushThrowSpeedSource ☍
-
How fast a breached brush door leaves, in units per second, whatever it weighs. A brush door's mass comes from its size, so the push is scaled by it.