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

Private Member Functions

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

Detailed Description

Definition at line 1 of file ActionTurnOffSpotlight.c.

Constructor & Destructor Documentation

◆ ActionTurnOffSpotlight()

void ActionTurnOffSpotlight::ActionTurnOffSpotlight ( )
inlineprivate

Definition at line 3 of file ActionTurnOffSpotlight.c.

4 {
5 m_Text = "#switch_off";
6 }
string m_Text
Definition ActionBase.c:49

References m_Text.

Member Function Documentation

◆ ActionCondition()

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

Definition at line 8 of file ActionTurnOffSpotlight.c.

9 {
10 Object targetObject = target.GetObject();
11 string selection = targetObject.GetActionComponentName(target.GetComponentIndex());
12 ItemBase target_IB = ItemBase.Cast(target.GetObject());
13
14 if (selection == Spotlight.SEL_REFLECTOR_COMP_U && target_IB.HasEnergyManager() && target_IB.GetCompEM().CanSwitchOff())
15 return true;
16
17 return false;
18 }

◆ OnExecuteServer()

override void ActionTurnOffSpotlight::OnExecuteServer ( ActionData action_data)
inlineprivate

Definition at line 20 of file ActionTurnOffSpotlight.c.

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

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