DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс AlarmClock_ColorBase
+ Граф наследования:AlarmClock_ColorBase:

Защищенные члены

void AnimateAlarmHand (float value)
 
override bool OnStoreLoad (ParamsReadContext ctx, int version)
 
override void OnStoreSave (ParamsWriteContext ctx)
 
override void OnDebugSpawn ()
 

Закрытые члены

override void Init ()
 
void ~AlarmClock_ColorBase ()
 
override void SetActions ()
 
override string GetToggleSound ()
 
override string GetRingingSound ()
 
override string GetDestroyedSound ()
 
override string GetHitSound ()
 
override string GetExplosiveTriggerSlotName ()
 
override void GetDebugActions (out TSelectableActionInfoArrayEx outputList)
 
override bool OnAction (int action_id, Man player, ParamsReadContext ctx)
 
override string GetDebugText ()
 
void OnUpdate ()
 

Закрытые данные

const string RINGING_SOUND = "AlarmClock_Ring_Loop_SoundSet"
 
const string TURN_TOGGLE_SOUND = "AlarmClock_Turn_Off_SoundSet"
 
const string DESTROYED_SOUND = "AlarmClock_Destroyed_SoundSet"
 
const string HIT_SOUND = "AlarmClock_Hit_SoundSet"
 

Закрытые статические данные

static ref NoiseParams m_NoisePar
 
static NoiseSystem m_NoiseSystem
 

Подробное описание

Конструктор(ы)

◆ ~AlarmClock_ColorBase()

void ~AlarmClock_ColorBase ( )
inlineprivate
28 {
29 #ifndef SERVER
31 #endif
32 }
void OnRingingStopClient()
Definition ClockBase.c:166

Перекрестные ссылки OnRingingStopClient().

Методы

◆ AnimateAlarmHand()

void AnimateAlarmHand ( float value)
inlineprotected
146 {
147 SetAnimationPhaseNow("ClockAlarm", value);
148 }
Definition EntityAI.c:95

◆ GetDebugActions()

override void GetDebugActions ( out TSelectableActionInfoArrayEx outputList)
inlineprivate
70 {
71 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.ACTIVATE_ENTITY, "SetAlarmAhead1Min", FadeColors.LIGHT_GREY));
72 outputList.Insert(new TSelectableActionInfoWithColor(SAT_DEBUG_ACTION, EActions.SEPARATOR, "___________________________", FadeColors.LIGHT_GREY));
73
74 super.GetDebugActions(outputList);
75 }
Param4< int, int, string, int > TSelectableActionInfoWithColor
Definition EntityAI.c:97
EActions
Definition EActions.c:2
const int SAT_DEBUG_ACTION
Definition constants.c:431

Перекрестные ссылки SAT_DEBUG_ACTION.

◆ GetDebugText()

override string GetDebugText ( )
inlineprivate
93 {
94 string debug_output;
95
96 if( GetGame().IsDedicatedServer())
97 {
98 debug_output = "alarm in: " + GetAlarmInMin().ToString() + " mins" + "\n";
99 debug_output += "current state: " + typename.EnumToString(EAlarmClockState, m_State) + "\n";;
100 debug_output += "ringing for " + m_RingingDuration.ToString()+ " secs" + "\n";
101 debug_output += "ringing max " + GetRingingDurationMax().ToString()+ " secs" + "\n";
102 }
103 else
104 {
105 debug_output = "this is client";
106 }
107 return debug_output;
108 }
float m_RingingDuration
Definition ClockBase.c:16
int GetAlarmInMin()
Definition ClockBase.c:53
EAlarmClockState
Definition ClockBase.c:2
float GetRingingDurationMax()
Definition ClockBase.c:181
enum EObjectTemperatureState m_State
proto string ToString()
proto native CGame GetGame()

Перекрестные ссылки GetAlarmInMin(), GetGame(), GetRingingDurationMax(), m_RingingDuration, m_State и float::ToString().

◆ GetDestroyedSound()

override string GetDestroyedSound ( )
inlineprivate
55 {
56 return DESTROYED_SOUND;
57 }
const string DESTROYED_SOUND
Definition AlarmClock.c:5

Перекрестные ссылки DESTROYED_SOUND.

◆ GetExplosiveTriggerSlotName()

override string GetExplosiveTriggerSlotName ( )
inlineprivate
65 {
66 return "TriggerAlarmClock";
67 }

◆ GetHitSound()

override string GetHitSound ( )
inlineprivate
60 {
61 return HIT_SOUND;
62 }
const string HIT_SOUND
Definition AlarmClock.c:6

Перекрестные ссылки HIT_SOUND.

◆ GetRingingSound()

override string GetRingingSound ( )
inlineprivate
50 {
51 return RINGING_SOUND;
52 }
const string RINGING_SOUND
Definition AlarmClock.c:3

Перекрестные ссылки RINGING_SOUND.

◆ GetToggleSound()

override string GetToggleSound ( )
inlineprivate
45 {
46 return TURN_TOGGLE_SOUND;
47 }
const string TURN_TOGGLE_SOUND
Definition AlarmClock.c:4

Перекрестные ссылки TURN_TOGGLE_SOUND.

◆ Init()

override void Init ( )
inlineprivate
13 {
14 super.Init();
15 if ( GetGame().IsServer() )
16 {
17 m_NoiseSystem = GetGame().GetNoiseSystem();
18 if ( m_NoiseSystem && !m_NoisePar )
19 {
20 // Create and load noise parameters
22 m_NoisePar.LoadFromPath("cfgVehicles " + GetType() + " NoiseAlarmClock");
23 }
24 }
25 }
eBleedingSourceType GetType()
Definition BleedingSource.c:63
class NoiseSystem NoiseParams()
Definition Noise.c:15
static ref NoiseParams m_NoisePar
Definition AlarmClock.c:9
static NoiseSystem m_NoiseSystem
Definition AlarmClock.c:10

Перекрестные ссылки GetGame(), GetType(), m_NoisePar, m_NoiseSystem и NoiseParams().

◆ OnAction()

override bool OnAction ( int action_id,
Man player,
ParamsReadContext ctx )
inlineprivate
78 {
79 if (super.OnAction(action_id, player, ctx))
80 return true;
81 if (GetGame().IsServer() || !GetGame().IsMultiplayer())
82 {
83 if (action_id == EActions.ACTIVATE_ENTITY)
84 {
86 }
87
88 }
89 return false;
90 }
void SetAlarmInXMins(int in_mins)
Definition ClockBase.c:171

Перекрестные ссылки GetGame() и SetAlarmInXMins().

◆ OnDebugSpawn()

override void OnDebugSpawn ( )
inlineprotected
198 {
199 TurnOn();
201 }
void TurnOn()
Definition ClockBase.c:301
void MakeRingingStart()
Definition ClockBase.c:223

Перекрестные ссылки MakeRingingStart() и TurnOn().

◆ OnStoreLoad()

override bool OnStoreLoad ( ParamsReadContext ctx,
int version )
inlineprotected
152 {
153 if (!super.OnStoreLoad(ctx, version))
154 return false;
155
156 if (version < 126)
157 {
158 return true;
159 }
160
162
163 if ( !ctx.Read( state ) )
164 {
165 return false;
166 }
167
168 float time;
169
170 if ( !ctx.Read( time ) )
171 {
172 return false;
173 }
174
177 if ( state == EAlarmClockState.SET )
178 {
179 TurnOn();
180 }
181 else if (state == EAlarmClockState.RINGING )
182 {
184 }
185
186 return true;
187 }
void SetAlarmTimeServer(float time01)
Definition ClockBase.c:320
void SetState(bool state)
Definition StaminaHandler.c:32

Перекрестные ссылки MakeRingingStart(), SetAlarmTimeServer(), SetState() и TurnOn().

◆ OnStoreSave()

override void OnStoreSave ( ParamsWriteContext ctx)
inlineprotected
190 {
191 super.OnStoreSave(ctx);
192
193 ctx.Write(m_State);
194 ctx.Write(m_AlarmTime01);
195 }
enum EAlarmClockState m_AlarmTime01

Перекрестные ссылки m_AlarmTime01 и m_State.

◆ OnUpdate()

void OnUpdate ( )
inlineprivate
111 {
112 if ( IsAlarmOn() )
113 {
114 //due to variable server time flow(day-night time accel), it's not possible to simply set a timer for X secs without some convoluted math/code, so we need to check at regular intervals
116
117 int pass, hour, minute;
118 GetGame().GetWorld().GetDate(pass, pass, pass, hour, minute);
119
121
122 //Print(GetAlarmInMin());
123
125 {
127 }
128 }
129
130 if ( IsRinging())
131 {
133
135 {
136 TurnOff();
137 }
138 else if ( m_NoiseSystem )
139 {
141 }
142 }
143 }
void TurnOff()
Definition ClockBase.c:306
bool IsRinging()
Definition ClockBase.c:291
bool IsAlarmOn()
Definition ClockBase.c:296
static int ConvertAlarmHand01ToMins12h(float time01)
Definition ClockBase.c:65
static const float UPDATE_TICK_RATE
Definition ClockBase.c:14
static int ConvertTimeToMins12h(int hour, int minute)
Definition ClockBase.c:81
class JsonUndergroundAreaTriggerData GetPosition
Definition UndergroundAreaLoader.c:9
Definition SensesAIEvaluate.c:2
static float GetNoiseReduction(Weather weather)
Definition SensesAIEvaluate.c:18

Перекрестные ссылки ConvertAlarmHand01ToMins12h(), ConvertTimeToMins12h(), GetGame(), NoiseAIEvaluate::GetNoiseReduction(), GetPosition, GetRingingDurationMax(), IsAlarmOn(), IsRinging(), m_AlarmTime01, m_NoisePar, m_NoiseSystem, m_RingingDuration, MakeRingingStart(), TurnOff() и UPDATE_TICK_RATE.

◆ SetActions()

override void SetActions ( )
inlineprivate
36 {
37 super.SetActions();
38
42 }
ActionTurnOffAlarmClockCB ActionSingleUseBaseCB ActionTurnOffAlarmClock()
Definition ActionTurnOffAlarmClock.c:11
ActionTurnOnAlarmClockCB ActionSingleUseBaseCB ActionTurnOnAlarmClock()
Definition ActionTurnOnAlarmClock.c:11
void AddAction(typename actionName)
Definition AdvancedCommunication.c:220
Definition ActionSetAlarmClock.c:14

Перекрестные ссылки ActionTurnOffAlarmClock(), ActionTurnOnAlarmClock() и AddAction().

Поля

◆ DESTROYED_SOUND

const string DESTROYED_SOUND = "AlarmClock_Destroyed_SoundSet"
private

Используется в GetDestroyedSound().

◆ HIT_SOUND

const string HIT_SOUND = "AlarmClock_Hit_SoundSet"
private

Используется в GetHitSound().

◆ m_NoisePar

ref NoiseParams m_NoisePar
staticprivate

Используется в Init() и OnUpdate().

◆ m_NoiseSystem

NoiseSystem m_NoiseSystem
staticprivate

Используется в Init() и OnUpdate().

◆ RINGING_SOUND

const string RINGING_SOUND = "AlarmClock_Ring_Loop_SoundSet"
private

Используется в GetRingingSound().

◆ TURN_TOGGLE_SOUND

const string TURN_TOGGLE_SOUND = "AlarmClock_Turn_Off_SoundSet"
private

Используется в GetToggleSound().


Объявления и описания членов класса находятся в файле: