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

Go to the source code of this file.

Classes

class  ActionTurnOffTransmitterCB
 

Functions

ActionTurnOffTransmitterCB ActionSingleUseBaseCB ActionTurnOffTransmitter ()
 
override void CreateActionComponent ()
 
override bool HasProneException ()
 
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 25 of file ActionTurnOffTransmitter.c.

26 {
27 if (item.IsTransmitter())
28 return item.HasEnergyManager() && item.GetCompEM().IsWorking();
29
30 return false;
31 }

◆ ActionTurnOffTransmitter()

ActionTurnOffTransmitterCB ActionSingleUseBaseCB ActionTurnOffTransmitter ( )

Definition at line 1 of file ActionTurnOffTransmitter.c.

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

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

◆ CreateActionComponent()

override void ActionTurnOffTransmitter::CreateActionComponent ( )

Definition at line 12 of file ActionTurnOffTransmitter.c.

12 {
13 m_CallbackClass = ActionTurnOffTransmitterCB;
14 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_ITEM_OFF;
15 m_CommandUIDProne = DayZPlayerConstants.CMD_ACTIONFB_ITEM_OFF;

References m_StanceMask, and m_Text.

◆ HasProneException()

override bool HasProneException ( )

Definition at line 20 of file ActionTurnOffTransmitter.c.

21 {
22 return true;
23 }

◆ OnExecuteServer()

override void OnExecuteServer ( ActionData action_data)

Definition at line 33 of file ActionTurnOffTransmitter.c.

34 {
35 action_data.m_MainItem.GetCompEM().SwitchOff();
36 }