Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionturnoffalarmclock.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CASingleUseTurnOnPlugged;
6  }
7 }
8 
10 {
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  }
18 
19  override bool HasProneException()
20  {
21  return true;
22  }
23 
24  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
25  {
26  ClockBase alarm = ClockBase.Cast(item);
27  return (alarm.IsRinging() || alarm.IsAlarmOn());
28  }
29 
30  override void OnExecuteServer( ActionData action_data )
31  {
32  ClockBase alarm = ClockBase.Cast(action_data.m_MainItem);
33  if (alarm)
34  alarm.TurnOff();
35  }
36 }
ItemBase
Definition: inventoryitem.c:730
OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition: actionturnoffalarmclock.c:30
ActionTurnOffAlarmClockCB
Definition: actionturnoffalarmclock.c:1
ClockBase
void ClockBase()
Definition: clockbase.c:27
ActionSingleUseBaseCB
Definition: actionsingleusebase.c:1
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
HasProneException
override bool HasProneException()
Definition: actionturnoffalarmclock.c:19
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionTurnOffWhileInHands
Definition: actionturnoffwhileinhands.c:1
CASingleUseTurnOnPlugged
Definition: casingleuseturnonplugged.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
ActionTurnOffAlarmClock
ActionTurnOffAlarmClockCB ActionSingleUseBaseCB ActionTurnOffAlarmClock()
Definition: actionturnoffalarmclock.c:11
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actionturnoffalarmclock.c:24