core.plugins.unisec-keypads.entities.uni_keypad.shared
Developed by Bobblehead. Copyright (c) Bobblehead 2016
- SharedENT:AccessDenied()Source ☍
-
Plays the reject feedback and fires the failure hotkey.
- SharedENT:AccessGranted(closeonly)Source ☍
-
Plays the accept feedback and drives the linked doors.
Parameters
- closeonlyboolean?Only close the doors rather than toggling them.
- SharedENT:ActivateDoor(closeonly)Source ☍
-
Opens, closes or toggles every linked door the keypad owner still owns.
Parameters
- closeonlyboolean?Only close the doors rather than toggling them.
- SharedENT:CanUse(ply) → booleanSource ☍
-
Whether a player is on the keypad filter or owns it.
Parameters
- plyPlayerThe player to test.
Returns
- boolean
- SharedENT:Clear()Source ☍
-
Clears the entered code and returns the keypad to its idle skin.
- SharedENT:doFade(door, act, toggle)Source ☍
-
Applies the configured lock/unlock sequence to one door.
Parameters
- doorEntityThe door to drive.
- actbooleanWhether access was granted.
- togglebooleanWhether to toggle rather than set the door state.
- SharedENT:Get2DTrace(ply) → number, numberSource ☍
-
Maps a player's eye trace onto 2D coordinates on the keypad face.
Parameters
- plyPlayerThe player looking at the keypad.
Returns
- 1numberFace-local x, or -1 when not looking at the face.
- 2numberFace-local y, or -1 when not looking at the face.
- SharedENT:GetHoveredElement() → nilSource ☍
-
Stub for the shared keypad UI contract; this keypad has no hover elements.
Returns
- nil
- SharedENT:Keypad(num)Source ☍
-
Appends a digit and evaluates the code once four have been entered.
Parameters
- numstring|numberThe digit pressed.
- SharedENT:LogAccess(ply, paid)Source ☍
-
Appends an entry to the keypad access log.
Parameters
- plyPlayer?The player who gained access, if any.
- paidboolean?Whether they paid for entry.
- SharedENT:OpenSettings(ply)Source ☍
-
Sends the keypad's configuration to a player allowed to edit it.
Parameters
- plyPlayerThe player requesting the settings menu.
- SharedENT:Process(b)Source ☍
-
Applies an external access decision, e.g. from Wiremod.
Parameters
- bbooleanWhether access was granted.
- SharedENT:RequestMoney(ply)Source ☍
-
Prompts a player to pay the keypad price.
Parameters
- plyPlayerThe player to bill.
- SharedENT:SendCommand()Source ☍
-
Stub for the shared keypad UI contract; this keypad sends no commands.
- SharedENT:SetDoors(d)Source ☍
-
Sets the doors this keypad controls, broadcasting them to clients.
Parameters
- dtableThe controlled door entities.
- SharedENT.DoorsSource ☍