Dayz Build 1.29.163047, Scripts Rev. 123548
Dayz Code Explorer by Zeroy
Loading...
Searching...
No Matches
clockbase.c File Reference

Go to the source code of this file.

Enumerations

enum  EAlarmClockState { UNSET , SET , RINGING , COUNT }

Functions

void ~ClockBase ()
void ActivateParent ()
void Arm ()
void ClockBase ()
static int ConvertAlarmHand01ToMins (float time01, int mins_max)
static int ConvertAlarmHand01ToMins12h (float time01)
static float ConvertMins12hToAlarmHand01 (int mins)
static int ConvertTimeToMins12h (int hour, int minute)
void Disarm ()
override void EEHitByRemote (int damageType, EntityAI source, int component, string dmgZone, string ammo, vector modelPos)
override void EEKilled (Object killer)
int GetAlarmInMin ()
string GetDestroyedSound ()
string GetHitSound ()
float GetRingingDurationMax ()
string GetRingingSound ()
static int GetTimeDiffInMins12h (int from_mins, int to_mins)
string GetToggleSound ()
string GetWorkingSound ()
void Init ()
bool IsAlarmOn ()
bool IsRinging ()
void MakeRingingStart ()
void MakeRingingStop ()
override void OnDamageDestroyed (int oldLevel)
void OnRingingStartClient ()
void OnRingingStartServer ()
void OnRingingStopClient ()
void OnRingingStopServer ()
override void OnVariablesSynchronized ()
override void SetActions ()
void SetAlarmInXMins (int in_mins)
void SetAlarmTimeServer (float time01)
void SetState (EAlarmClockState state)
void SetupTimerServer ()
void TurnOff ()
void TurnOffClient ()
void TurnOn ()
void TurnOnClient ()

Variables

enum EAlarmClockState m_AlarmTime01
EffectSound m_DestoryedSound
EffectSound m_HitSound
float m_RingingDuration
EffectSound m_RingingSoundLoop
int m_State = EAlarmClockState.UNSET
int m_StatePrev = -1
ref Timer m_TimerUpdate
EffectSound m_TurnOnSound
EffectSound m_WorkingSound
const float RINGING_DURATION_MAX = 60
static const float UPDATE_TICK_RATE = 1

Enumeration Type Documentation

◆ EAlarmClockState

Enumerator
UNSET 
SET 
RINGING 
COUNT 

Definition at line 1 of file clockbase.c.

Function Documentation

◆ ~ClockBase()

◆ ActivateParent()

void ActivateParent ( )
protected

Definition at line 211 of file clockbase.c.

Referenced by OnRingingStartServer().

◆ Arm()

void Arm ( )
protected

Definition at line 204 of file clockbase.c.

References m_RingingDuration, SetState(), and SetupTimerServer().

◆ ClockBase()

◆ ConvertAlarmHand01ToMins()

int ConvertAlarmHand01ToMins ( float time01,
int mins_max )
staticprotected

Definition at line 70 of file clockbase.c.

References Math::Lerp().

◆ ConvertAlarmHand01ToMins12h()

int ConvertAlarmHand01ToMins12h ( float time01)
staticprotected

Definition at line 65 of file clockbase.c.

References Math::Lerp().

Referenced by GetAlarmInMin(), and AlarmClock_ColorBase::OnUpdate().

◆ ConvertMins12hToAlarmHand01()

float ConvertMins12hToAlarmHand01 ( int mins)
staticprotected

Definition at line 75 of file clockbase.c.

References Math::InverseLerp().

Referenced by SetAlarmInXMins().

◆ ConvertTimeToMins12h()

int ConvertTimeToMins12h ( int hour,
int minute )
staticprotected

Definition at line 81 of file clockbase.c.

Referenced by GetAlarmInMin(), AlarmClock_ColorBase::OnUpdate(), and SetAlarmInXMins().

◆ Disarm()

void Disarm ( )
protected

Definition at line 199 of file clockbase.c.

References SetState().

Referenced by TurnOff().

◆ EEHitByRemote()

override void EEHitByRemote ( int damageType,
EntityAI source,
int component,
string dmgZone,
string ammo,
vector modelPos )
protected

Definition at line 128 of file clockbase.c.

References component, GetHitSound(), and m_HitSound.

◆ EEKilled()

override void EEKilled ( Object killer)
protected

Definition at line 122 of file clockbase.c.

References TurnOff().

◆ GetAlarmInMin()

int GetAlarmInMin ( )
protected

◆ GetDestroyedSound()

string GetDestroyedSound ( )
protected

Definition at line 113 of file clockbase.c.

Referenced by OnDamageDestroyed().

◆ GetHitSound()

string GetHitSound ( )
protected

Definition at line 109 of file clockbase.c.

Referenced by EEHitByRemote().

◆ GetRingingDurationMax()

float GetRingingDurationMax ( )
protected

◆ GetRingingSound()

string GetRingingSound ( )
protected

Definition at line 105 of file clockbase.c.

Referenced by OnRingingStartClient().

◆ GetTimeDiffInMins12h()

int GetTimeDiffInMins12h ( int from_mins,
int to_mins )
staticprotected

Definition at line 88 of file clockbase.c.

Referenced by GetAlarmInMin().

◆ GetToggleSound()

string GetToggleSound ( )
protected

Definition at line 101 of file clockbase.c.

Referenced by OnVariablesSynchronized().

◆ GetWorkingSound()

string GetWorkingSound ( )
protected

Definition at line 117 of file clockbase.c.

Referenced by OnVariablesSynchronized().

◆ Init()

void Init ( )

Definition at line 41 of file clockbase.c.

◆ IsAlarmOn()

bool IsAlarmOn ( )
protected

Definition at line 296 of file clockbase.c.

References m_State.

Referenced by AlarmClock_ColorBase::OnUpdate().

◆ IsRinging()

bool IsRinging ( )
protected

Definition at line 291 of file clockbase.c.

References m_State.

Referenced by AlarmClock_ColorBase::OnUpdate(), KitchenTimer::OnUpdate(), and TurnOff().

◆ MakeRingingStart()

◆ MakeRingingStop()

void MakeRingingStop ( )
protected

Definition at line 232 of file clockbase.c.

References OnRingingStopServer(), and SetState().

Referenced by KitchenTimer::OnUpdate(), and TurnOff().

◆ OnDamageDestroyed()

override void OnDamageDestroyed ( int oldLevel)
protected

Definition at line 134 of file clockbase.c.

References g_Game, GetDestroyedSound(), m_DestoryedSound, and OnRingingStopClient().

◆ OnRingingStartClient()

void OnRingingStartClient ( )
protected

◆ OnRingingStartServer()

void OnRingingStartServer ( )
protected

Definition at line 149 of file clockbase.c.

References ActivateParent().

Referenced by MakeRingingStart().

◆ OnRingingStopClient()

void OnRingingStopClient ( )
protected

◆ OnRingingStopServer()

void OnRingingStopServer ( )
protected

Referenced by MakeRingingStop().

◆ OnVariablesSynchronized()

◆ SetActions()

override void SetActions ( )

Definition at line 46 of file clockbase.c.

References ActionAttachExplosivesTrigger(), and AddAction().

◆ SetAlarmInXMins()

void SetAlarmInXMins ( int in_mins)
protected

◆ SetAlarmTimeServer()

void SetAlarmTimeServer ( float time01)
protected

Definition at line 320 of file clockbase.c.

References m_AlarmTime01.

Referenced by AlarmClock_ColorBase::OnStoreLoad(), and SetAlarmInXMins().

◆ SetState()

void SetState ( EAlarmClockState state)
protected

Definition at line 193 of file clockbase.c.

References m_State.

◆ SetupTimerServer()

void SetupTimerServer ( )
protected

Definition at line 187 of file clockbase.c.

References m_TimerUpdate, and UPDATE_TICK_RATE.

Referenced by Arm(), and MakeRingingStart().

◆ TurnOff()

void TurnOff ( )
protected

Definition at line 306 of file clockbase.c.

References Disarm(), IsRinging(), m_TimerUpdate, and MakeRingingStop().

Referenced by EEKilled(), and AlarmClock_ColorBase::OnUpdate().

◆ TurnOffClient()

void TurnOffClient ( )
protected

◆ TurnOn()

void TurnOn ( )
protected

◆ TurnOnClient()

void TurnOnClient ( )
protected

Variable Documentation

◆ m_AlarmTime01

◆ m_DestoryedSound

EffectSound m_DestoryedSound

Definition at line 21 of file clockbase.c.

Referenced by ~ClockBase(), and OnDamageDestroyed().

◆ m_HitSound

EffectSound m_HitSound

Definition at line 22 of file clockbase.c.

Referenced by ~ClockBase(), and EEHitByRemote().

◆ m_RingingDuration

◆ m_RingingSoundLoop

EffectSound m_RingingSoundLoop

◆ m_State

Definition at line 13 of file clockbase.c.

◆ m_StatePrev

int m_StatePrev = -1

Definition at line 17 of file clockbase.c.

Referenced by OnVariablesSynchronized(), and SetState().

◆ m_TimerUpdate

ref Timer m_TimerUpdate

Definition at line 15 of file clockbase.c.

Referenced by ~HudDebug(), Init(), MakeRingingStart(), SetupTimerServer(), and TurnOff().

◆ m_TurnOnSound

EffectSound m_TurnOnSound

Definition at line 20 of file clockbase.c.

Referenced by ~ClockBase(), and OnVariablesSynchronized().

◆ m_WorkingSound

EffectSound m_WorkingSound

◆ RINGING_DURATION_MAX

const float RINGING_DURATION_MAX = 60

Definition at line 25 of file clockbase.c.

Referenced by GetRingingDurationMax().

◆ UPDATE_TICK_RATE

const float UPDATE_TICK_RATE = 1
static