DayZ 1.24
Loading...
Searching...
No Matches
ActionTurnOffPowerGenerator Class Reference
Inheritance diagram for ActionTurnOffPowerGenerator:
[legend]
Collaboration diagram for ActionTurnOffPowerGenerator:
[legend]

Private Member Functions

void ActionTurnOffPowerGenerator ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void OnExecuteServer (ActionData action_data)
 

Detailed Description

Definition at line 1 of file ActionTurnOffPowerGenerator.c.

Constructor & Destructor Documentation

◆ ActionTurnOffPowerGenerator()

void ActionTurnOffPowerGenerator::ActionTurnOffPowerGenerator ( )
inlineprivate

Definition at line 3 of file ActionTurnOffPowerGenerator.c.

4 {
5 m_CommandUID = DayZPlayerConstants.CMD_ACTIONMOD_INTERACTONCE;
6 m_Text = "#switch_off";
7 }
string m_Text
Definition ActionBase.c:49
DayZPlayerConstants
defined in C++
Definition dayzplayer.c:597

References AnimatedActionBase::m_CommandUID, and m_Text.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 9 of file ActionTurnOffPowerGenerator.c.

10 {
11 Object targetObject = target.GetObject();
13
14 if (target_IB.HasEnergyManager() && target_IB.GetCompEM().CanSwitchOff())
15 return true;
16 else
17 return false;
18 }

◆ OnExecuteServer()

override void ActionTurnOffPowerGenerator::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 20 of file ActionTurnOffPowerGenerator.c.

21 {
22 Object targetObject = action_data.m_Target.GetObject();
23 if (targetObject)
24 {
26 target_IB.GetCompEM().SwitchOff();
27 target_IB.GetCompEM().InteractBranch(target_IB);
28 }
29 }

The documentation for this class was generated from the following file: