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

Private Member Functions

void ActionTurnOffHeadtorch ()
 
override bool IsInstant ()
 
override bool HasTarget ()
 
override bool UseMainItem ()
 
override void CreateConditionComponents ()
 
override GetInputType ()
 
override bool ActionCondition (PlayerBase player, ActionTarget target, ItemBase item)
 
override void Start (ActionData action_data)
 

Detailed Description

Definition at line 1 of file ActionTurnOffHeadtorch.c.

Constructor & Destructor Documentation

◆ ActionTurnOffHeadtorch()

void ActionTurnOffHeadtorch::ActionTurnOffHeadtorch ( )
inlineprivate

Definition at line 3 of file ActionTurnOffHeadtorch.c.

4 {
5 }

Member Function Documentation

◆ ActionCondition()

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

Definition at line 33 of file ActionTurnOffHeadtorch.c.

34 {
35 Headtorch_ColorBase headtorch;
36 headtorch = Headtorch_ColorBase.Cast(target.GetObject());
37 if (!headtorch)
38 return false;
39
40 if (headtorch.HasEnergyManager() && headtorch.GetCompEM().CanSwitchOff()) //TODO review conditions for turning off
41 return true;
42
43 return false;
44 }

◆ CreateConditionComponents()

override void ActionTurnOffHeadtorch::CreateConditionComponents ( )
inlineprivate

Definition at line 22 of file ActionTurnOffHeadtorch.c.

23 {
26 }
ref CCIBase m_ConditionItem
Definition ActionBase.c:55
ref CCTBase m_ConditionTarget
Definition ActionBase.c:56
const float DEFAULT

References UAMaxDistances::DEFAULT, m_ConditionItem, and m_ConditionTarget.

◆ GetInputType()

override ActionTurnOffHeadtorch::GetInputType ( )
inlineprivate

Definition at line 28 of file ActionTurnOffHeadtorch.c.

◆ HasTarget()

override bool ActionTurnOffHeadtorch::HasTarget ( )
inlineprivate

Definition at line 12 of file ActionTurnOffHeadtorch.c.

13 {
14 return true;
15 }

◆ IsInstant()

override bool ActionTurnOffHeadtorch::IsInstant ( )
inlineprivate

Definition at line 7 of file ActionTurnOffHeadtorch.c.

8 {
9 return true;
10 }

◆ Start()

override void ActionTurnOffHeadtorch::Start ( ActionData action_data)
inlineprivate

Definition at line 46 of file ActionTurnOffHeadtorch.c.

47 {
48 super.Start(action_data);
49
50 Headtorch_ColorBase headtorch;
51 headtorch = Headtorch_ColorBase.Cast(action_data.m_Target.GetObject());
52 if (headtorch.HasEnergyManager())
53 {
54 if (headtorch.GetCompEM().IsSwitchedOn())
55 headtorch.GetCompEM().SwitchOff();
56 }
57 }

◆ UseMainItem()

override bool ActionTurnOffHeadtorch::UseMainItem ( )
inlineprivate

Definition at line 17 of file ActionTurnOffHeadtorch.c.

18 {
19 return false;
20 }

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