3 const string RINGING_SOUND =
"AlarmClock_Ring_Loop_SoundSet";
4 const string TURN_TOGGLE_SOUND =
"AlarmClock_Turn_Off_SoundSet";
5 const string DESTROYED_SOUND =
"AlarmClock_Destroyed_SoundSet";
6 const string HIT_SOUND =
"AlarmClock_Hit_SoundSet";
17 m_NoiseSystem =
g_Game.GetNoiseSystem();
18 if ( m_NoiseSystem && !m_NoisePar )
22 m_NoisePar.LoadFromPath(
"cfgVehicles " +
GetType() +
" NoiseAlarmClock");
46 return TURN_TOGGLE_SOUND;
56 return DESTROYED_SOUND;
64 override string GetExplosiveTriggerSlotName()
66 return "TriggerAlarmClock";
69 override void GetDebugActions(out TSelectableActionInfoArrayEx outputList)
74 super.GetDebugActions(outputList);
79 if (super.OnAction(action_id, player, ctx))
83 if (action_id ==
EActions.ACTIVATE_ENTITY)
96 if(
g_Game.IsDedicatedServer())
98 debug_output =
"alarm in: " +
GetAlarmInMin().ToString() +
" mins" +
"\n";
105 debug_output =
"this is client";
115 int alarm_hand_in_minutes = ConvertAlarmHand01ToMins12h(
m_AlarmTime01);
117 int pass, hour, minute;
118 g_Game.GetWorld().GetDate(pass, pass, pass, hour, minute);
120 int curr_time_in_minutes = ConvertTimeToMins12h(hour, minute);
124 if ( alarm_hand_in_minutes == curr_time_in_minutes )
138 else if ( m_NoiseSystem )
147 SetAnimationPhaseNow(
"ClockAlarm", value);
153 if (!super.OnStoreLoad(ctx, version))
163 if ( !ctx.Read( state ) )
170 if ( !ctx.Read( time ) )
191 super.OnStoreSave(ctx);
Param4< int, int, string, int > TSelectableActionInfoWithColor
eBleedingSourceType GetType()
ActionTurnOffAlarmClockCB ActionSingleUseBaseCB ActionTurnOffAlarmClock()
ActionTurnOnAlarmClockCB ActionSingleUseBaseCB ActionTurnOnAlarmClock()
void AddAction(typename actionName)
void AnimateAlarmHand(float value)
override void OnStoreSave(ParamsWriteContext ctx)
override bool OnStoreLoad(ParamsReadContext ctx, int version)
override void OnDebugSpawn()
enum EAlarmClockState m_AlarmTime01
void OnRingingStopClient()
void SetAlarmInXMins(int in_mins)
float GetRingingDurationMax()
void SetAlarmTimeServer(float time01)
string GetDestroyedSound()
Serializer ParamsReadContext
Serializer ParamsWriteContext
const int SAT_DEBUG_ACTION
vector GetPosition()
Get the world position of the Effect.
class NoiseSystem NoiseParams()
enum EObjectTemperatureState m_State
void SetState(bool state)