DIFF

class CodeLockComponent

CodeLockComponent › Managed

Constructors 1

Constants 4

const int MIN_LOCK_PIN_LENGTH = 4

min amount of digits the combination needs to contain

const int MAX_LOCK_PIN_LENGTH = 6

max amount of digits the combination can contain

private const float DEFAULT_BRUTEFORCE_TIME = 30.0
Referenced by CodeLockComponent()
private const float DEFAULT_BRUTEFORCE_RESET_TIME = 3600.0
Referenced by CodeLockComponent()

Members 16

protected int m_MinLockPinLength
protected string m_InputPIN

combination that is dialed on lock

protected string m_LockPIN

actual combination of the lock

protected bool m_IsLocked

lock state

protected int m_DoorIndex = -1

code lock door index for parent building if code lock belongs to a door

protected bool m_HasPIN

code state

protected float m_BruteForceProtectionTime
protected float m_BruteForceResetTime
protected ref Timer m_BruteForceUpdateTimer
protected ref Timer m_BruteForceResetTimer
protected bool m_HandleBruteForceProtection
protected CodeLockUIAction m_UIAction

Methods 40

void SetMinimalPinCodeLength(int length)
bool SetInputCode(string pin, bool force = true)
Referenced by CheckCodeRequest(), and OnRPC()
protected bool ValidatePIN(string pin)
Referenced by SetLockCode()
void ResetPIN(bool sync = true)
References SetStage(), SyncAndMarkDirty(), m_HasPIN
Show 1 more, m_LockPIN
void OnStoreSave(ParamsWriteContext ctx)
References Serializer.Write(), m_DoorIndex, m_IsLocked
Show 1 more, m_LockPIN
protected void ResetUIActionServer()
protected void CheckBruteForceState()
void OnParentDetached(bool sync = true)
EntityAI GetParent()
References m_Parent
void SetDoorIndex(int index)
References m_DoorIndex
int GetDoorIndex()
References m_DoorIndex
vector GetPosition()

ToDo: Door parent position handling?!

string GetInputPIN()
References m_InputPIN
string GetLockPIN()
References m_LockPIN
bool HasParent()
References m_DoorIndex, and m_Parent
int GetWrongCodeCount()
References m_WrongCodeCount
int GetMinLockPINLength()