DayZ 1.24
Loading...
Searching...
No Matches
ActionTurnOnTransmitter.c
Go to the documentation of this file.
2{
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 return item.HasEnergyManager() && !item.GetCompEM().IsWorking();
23
24 return false;
25 }
26
28 {
29 action_data.m_MainItem.GetCompEM().SwitchOn();
30 }
31}
string m_Text
Definition ActionBase.c:49
ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter()
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