Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actionturnontransmitter.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 = ActionTurnOnTransmitterCB;
14  m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_ITEM_ON;
15  m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_ITEM_ON;
16  m_Text = "#turn_on";
17  }
18 
19  override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
20  {
21  if (item.IsTransmitter())
22  {
23  return item.HasEnergyManager() && !item.GetCompEM().IsWorking();
24  }
25 
26  return false;
27  }
28 
29  override void OnExecuteServer(ActionData action_data)
30  {
31  action_data.m_MainItem.GetCompEM().SwitchOn();
32  }
33 }
ItemBase
Definition: inventoryitem.c:730
ActionTurnOnTransmitter
ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter()
Definition: actionturnontransmitter.c:11
ActionTurnOnWhileInHands
Definition: actionturnonwhileinhands.c:1
ActionTurnOnTransmitterCB
Definition: actionturnontransmitter.c:1
ActionSingleUseBaseCB
Definition: actionsingleusebase.c:1
PlayerBase
Definition: playerbaseclient.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
DayZPlayerConstants
DayZPlayerConstants
defined in C++
Definition: dayzplayer.c:601
ActionCondition
override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
Definition: actionturnontransmitter.c:19
CASingleUseTurnOnPlugged
Definition: casingleuseturnonplugged.c:1
m_Text
protected string m_Text
Definition: actionbase.c:49
OnExecuteServer
override void OnExecuteServer(ActionData action_data)
Definition: actionturnontransmitter.c:29