Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionturnofftransmitter.c
Go to the documentation of this file.
2 {
3  override void CreateActionComponent()
4  {
5  m_ActionData.m_ActionComponent = new CASingleUse();
6  }
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  {
29  return item.HasEnergyManager() && item.GetCompEM().IsWorking();
30  }
31 
32  return false;
33  }
34 
35  override void OnExecuteServer(ActionData action_data)
36  {
37  action_data.m_MainItem.GetCompEM().SwitchOff();
38  }
39 }
ItemBase
Definition: inventoryitem.c:730
ActionTurnOffTransmitterCB
Definition: actionturnofftransmitter.c:1
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actionturnofftransmitter.c:25
CASingleUse
Definition: casingleuse.c:1
ActionTurnOffTransmitter
ActionTurnOffTransmitterCB ActionSingleUseBaseCB ActionTurnOffTransmitter()
Definition: actionturnofftransmitter.c:11
ActionSingleUseBaseCB
Definition: actionsingleusebase.c:1
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition: actionturnofftransmitter.c:35
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
HasProneException
override bool HasProneException()
Definition: actionturnofftransmitter.c:20
ActionTurnOffWhileInHands
Definition: actionturnoffwhileinhands.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
m_StanceMask
protected int m_StanceMask
Definition: actionbase.c:53