class CodeLockComponent
CodeLockComponent › Managed
Constructors 1
Constants 5
const int MIN_LOCK_PIN_LENGTH = 4min amount of digits the combination needs to contain
const int MAX_LOCK_PIN_LENGTH = 6max amount of digits the combination can contain
Show 1 more
, DigitalCodeLock_Bunker.Init()private const float DEFAULT_BRUTEFORCE_TIME = 30.0private const float DEFAULT_BRUTEFORCE_RESET_TIME = 3600.0const float CODELOCK_MAX_CODE_DISTANCE_SQ = Math.SqrFloat(5.0)Max distance from the lock a player may submit code requests, also used by the code lock UI to close the menu
Members 17
protected int m_MinLockPinLengthShow 3 more
, SetLockCode(), SetMinimalPinCodeLength(), and ValidatePIN()protected string m_InputPINcombination that is dialed on lock
protected string m_LockPINactual combination of the lock
Show 4 more
, OnStoreLoad(), OnStoreSave(), ResetPIN(), and SetLockCode()protected bool m_IsLockedlock state
Show 3 more
, OnStoreLoad(), OnStoreSave(), and SetLockState()protected EntityAI m_Parentcode lock parent entity
protected int m_DoorIndex = -1code lock door index for parent building if code lock belongs to a door
Show 6 more
, HasParent(), OnParentDetached(), OnStoreLoad(), OnStoreSave(), SetDoorIndex(), and SetLockState()protected bool m_HasPINcode state
Show 5 more
, HasPIN(), OnStoreLoad(), ResetPIN(), SetLockCode(), and SetLockState()protected float m_BruteForceProtectionTimeprotected float m_BruteForceResetTimeprotected int m_StageShow 3 more
, SetLockState(), SetStage(), and ShouldTriggerProtectionStage()protected ref Timer m_BruteForceUpdateTimerShow 2 more
, OnParentReset(), and StopAllTimers()protected ref Timer m_BruteForceResetTimerShow 1 more
, StopAllTimers()protected int m_WrongCodeCountprotected bool m_HasBruteForceProtectionprotected bool m_HandleBruteForceProtectionShow 2 more
, SetLockState(), and ShouldHandleBruteForce()protected CodeLockUIAction m_UIActionShow 1 more
, ResetUIActionServer()protected PluginAdminLog m_AdmingLogMethods 45
void SetStage(CodeLockStage stage)void SetMinimalPinCodeLength(int length)Show 2 more
, m_MinLockPinLength, and MAX_LOCK_PIN_LENGTHShow 8 more
, SetLockState(), SetStage(), SyncAndMarkDirty(), ValidatePIN(), m_HasPIN, m_LockPIN, m_MinLockPinLength, and MAX_LOCK_PIN_LENGTHvoid ResetPIN(bool sync = true)Show 16 more
, CGame.IsMultiplayer(), CGame.IsServer(), SetStage(), ItemBase.StartItemSoundServer(), StopAllTimers(), SyncAndMarkDirty(), SoundConstants.ITEM_DIGITAL_LOCK_LOCK, SoundConstants.ITEM_DIGITAL_LOCK_UNLOCK, m_DoorIndex, m_HandleBruteForceProtection, m_HasBruteForceProtection, m_HasPIN, m_IsLocked, m_Parent, m_Stage, and m_WrongCodeCountShow 3 more
, SetLockCode(), DigitalCodeLock.OnWork(), and DigitalCodeLock.SetLockState()protected void HandleHierarchyRootLock(bool state)void OnStoreSave(ParamsWriteContext ctx)bool OnStoreLoad(ParamsReadContext ctx, int version)Show 6 more
, Serializer.Read(), SetLockState(), m_DoorIndex, m_HasPIN, m_IsLocked, and m_LockPINprotected void CheckUIActionServer(CodeLockUIAction uiAction)Derive from a stored PIN only - the minimum length is a mutable setting, coupling to it let a lock load as "no PIN" (and be claimed) after a config change
Show 5 more
, DayZGame.GetCallQueue(), CGame.IsMultiplayer(), CGame.IsServer(), SyncAndMarkDirty(), and m_UIActionprotected void ResetUIActionServer()void CheckUIActionClient()private PlayerBase ResolveCodeRequestPlayer(PlayerIdentity identity)Resolves the RPC sender identity to the matching player entity on the server
Show 1 more
, CGame.IsMultiplayer()private bool ValidateCodeRequest(PlayerBase player)Server-side trust boundary for code requests: the sender must be a living, acting player standing in range on the keypad side of a powered lock
Player keypad input is digits only, reject anything else before it can be stored as a PIN
private void LogExploitAttempt(PlayerIdentity identity, string reason)Show 2 more
, m_AdmingLog, and m_Parentprivate void SendCodeResponse(PlayerIdentity identity, bool success)Sends the code response back to the requesting client (or handles single player)
Show 6 more
, GetGame(), CGame.GetUIManager(), CGame.IsHeadlessOrDedicatedServer(), CGame.RPCSingleParam(), SetInputCode(), and m_Parentprotected void CheckCodeRequest(string pin, PlayerIdentity identity)Offline/single-player handling
Show 26 more
, ErrorEx(), GetInputPIN(), GetLockPIN(), DigitalCodeLock.GetVisualManager(), HandleBruteForceProtectionServer(), CGame.IsDedicatedServer(), IsDigitsOnly(), CGame.IsMultiplayer(), CGame.IsServer(), LogExploitAttempt(), ResolveCodeRequestPlayer(), SendCodeResponse(), SetInputCode(), SetLockCode(), SetLockState(), EntityAI.SetSynchDirty(), ItemBase.StartItemSoundServer(), CodeLockVisualManager.UpdateVisuals(), ValidateCodeRequest(), SoundConstants.ITEM_DIGITAL_LOCK_ERROR, m_HasBruteForceProtection, m_HasPIN, m_InputPIN, m_IsLocked, m_LockPIN, and m_Parentprotected void HandleBruteForceProtectionServer()Reject non-digit PINs that could never be dialed back on the keypad (owner lockout)
Show 4 more
, m_BruteForceProtectionTime, m_BruteForceResetTime, m_HasBruteForceProtection, and m_WrongCodeCountvoid StopAllTimers()Show 1 more
, DigitalCodeLock.OnWorkStop()private bool ShouldTriggerProtectionStage()Show 1 more
, m_WrongCodeCountprotected void CheckBruteForceState()Show 2 more
, m_HandleBruteForceProtection, and m_HasBruteForceProtectionprotected void CheckBruteForceReset()void OnParentDetached(bool sync = true)void OnParentReset(bool sync = true)void OnRPC(PlayerIdentity sender, int type, ParamsReadContext ctx)protected void UpdateParentVisuals()Only accept UI actions from a valid in-range sender, prevents remote sound spam
Show 2 more
, CodeLockVisualManager.UpdateVisuals(), and m_Parentprotected void SyncAndMarkDirty()Show 1 more
, m_ParentShow 6 more
, OnParentDetached(), OnParentReset(), ResetPIN(), ResetUIActionServer(), SetLockCode(), and SetLockState()void SetDoorIndex(int index)int GetDoorIndex()vector GetPosition()ToDo: Door parent position handling?!
string GetInputPIN()bool IsLocked()bool HasParent()bool HasBruteForceProtection()bool ShouldHandleBruteForce()int GetWrongCodeCount()int GetMinLockPINLength()CodeLockUIAction GetUIAction()