DayZ 1.24
Loading...
Searching...
No Matches
ActionTurnOnTransmitter.c File Reference

Go to the source code of this file.

Classes

class  ActionTurnOnTransmitterCB
 

Functions

ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter ()
 
override void CreateActionComponent ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 

Function Documentation

◆ ActionCondition()

override bool ActionCondition ( PlayerBase player,
ActionTarget target,
ItemBase item )

Definition at line 19 of file ActionTurnOnTransmitter.c.

20 {
21 if (item.IsTransmitter())
22 return item.HasEnergyManager() && !item.GetCompEM().IsWorking();
23
24 return false;
25 }

◆ ActionTurnOnTransmitter()

ActionTurnOnTransmitterCB ActionSingleUseBaseCB ActionTurnOnTransmitter ( )

Definition at line 1 of file ActionTurnOnTransmitter.c.

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 }
string m_Text
Definition ActionBase.c:49
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

Referenced by ActionConstructor::RegisterActions(), ItemMegaphone::SetActions(), ItemRadio::SetActions(), and ItemTransmitter::SetActions().

◆ CreateActionComponent()

override void ActionTurnOnTransmitter::CreateActionComponent ( )

Definition at line 12 of file ActionTurnOnTransmitter.c.

12 {
13 m_CallbackClass = ActionTurnOnTransmitterCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_ITEM_ON;
15 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_ITEM_ON;

References m_Text.

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)

Definition at line 27 of file ActionTurnOnTransmitter.c.

28 {
29 action_data.m_MainItem.GetCompEM().SwitchOn();
30 }