DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
ActionResetKitchenTimer.c
Go to the documentation of this file.
2{
3 override void CreateActionComponent()
4 {
6 }
7}
8
10{
12 {
13 m_CallbackClass = ActionResetKitchenTimerClockCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_RESET_KITCHENTIMER;
15 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONMOD_RESET_KITCHENTIMER;
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}
protected string m_Text
Definition ActionBase.c:49
ActionResetKitchenTimerClockCB ActionSingleUseBaseCB ActionResetKitchenTimer()
class ActionTargets ActionTarget
void ClockBase()
Definition ClockBase.c:27
protected ActionData m_ActionData
ItemBase m_MainItem
Definition ActionBase.c:28
ref CABase m_ActionComponent
Definition ActionBase.c:30
override void OnExecuteServer(ActionData action_data)
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:602