DayZ 1.24
Loading...
Searching...
No Matches
ActionTurnOffTransmitter.c
Go to the documentation of this file.
2{
7}
8
10{
12 {
13 m_CallbackClass = ActionTurnOffTransmitterCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_ITEM_OFF;
15 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_ITEM_OFF;
16 m_StanceMask = DayZPlayerConstants.STANCEMASK_CROUCH | DayZPlayerConstants.STANCEMASK_ERECT;
17 m_Text = "#turn_off";
18 }
19
20 override bool HasProneException()
21 {
22 return true;
23 }
24
25 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
26 {
27 if (item.IsTransmitter())
28 return item.HasEnergyManager() && item.GetCompEM().IsWorking();
29
30 return false;
31 }
32
34 {
35 action_data.m_MainItem.GetCompEM().SwitchOff();
36 }
37}
string m_Text
Definition ActionBase.c:49
int m_StanceMask
Definition ActionBase.c:53
ActionTurnOffTransmitterCB ActionSingleUseBaseCB ActionTurnOffTransmitter()
ActionData m_ActionData
ref CABase m_ActionComponent
Definition ActionBase.c:30
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
override void OnExecuteServer(ActionData action_data)
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597