DayZ 1.24
Loading...
Searching...
No Matches
ActionTurnOffAlarmClock.c File Reference

Go to the source code of this file.

Classes

class  ActionTurnOffAlarmClockCB
 

Functions

ActionTurnOffAlarmClockCB ActionSingleUseBaseCB ActionTurnOffAlarmClock ()
 
override void CreateActionComponent ()
 
override bool HasProneException ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 

Function Documentation

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 24 of file ActionTurnOffAlarmClock.c.

25 {
26 ClockBase alarm = ClockBase.Cast(item);
27 return (alarm.IsRinging() || alarm.IsAlarmOn());
28 }

◆ ActionTurnOffAlarmClock()

ActionTurnOffAlarmClockCB ActionSingleUseBaseCB ActionTurnOffAlarmClock ( )

Definition at line 1 of file ActionTurnOffAlarmClock.c.

12 {
13 m_CallbackClass = ActionTurnOffAlarmClockCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_STOP_ALARM;
15 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_STOP_ALARM;
16 m_Text = "#turn_off";
17 }
string m_Text
Definition ActionBase.c:49
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), and AlarmClock_ColorBase::SetActions().

◆ CreateActionComponent()

override void ActionTurnOffAlarmClock::CreateActionComponent ( )

Definition at line 12 of file ActionTurnOffAlarmClock.c.

12 {
13 m_CallbackClass = ActionTurnOffAlarmClockCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_STOP_ALARM;
15 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_STOP_ALARM;

References m_Text.

◆ HasProneException()

override bool HasProneException ( )

Definition at line 19 of file ActionTurnOffAlarmClock.c.

20 {
21 return true;
22 }

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)

Definition at line 30 of file ActionTurnOffAlarmClock.c.

31 {
32 ClockBase alarm = ClockBase.Cast(action_data.m_MainItem);
33 if (alarm)
34 alarm.TurnOff();
35 }