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

Private Member Functions

void ActionTurnOnHeadtorch ()
 
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 ActionTurnOnHeadtorch.c.

Constructor & Destructor Documentation

◆ ActionTurnOnHeadtorch()

void ActionTurnOnHeadtorch::ActionTurnOnHeadtorch ( )
inlineprivate

Definition at line 3 of file ActionTurnOnHeadtorch.c.

4 {
5 }

Member Function Documentation

◆ ActionCondition()

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

Definition at line 33 of file ActionTurnOnHeadtorch.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().CanSwitchOn() && headtorch.GetCompEM().CanWork()) //TODO review conditions for turning off
41 return true;
42
43 return false;
44 }

◆ CreateConditionComponents()

override void ActionTurnOnHeadtorch::CreateConditionComponents ( )
inlineprivate

Definition at line 22 of file ActionTurnOnHeadtorch.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 ActionTurnOnHeadtorch::GetInputType ( )
inlineprivate

Definition at line 28 of file ActionTurnOnHeadtorch.c.

◆ HasTarget()

override bool ActionTurnOnHeadtorch::HasTarget ( )
inlineprivate

Definition at line 12 of file ActionTurnOnHeadtorch.c.

13 {
14 return true;
15 }

◆ IsInstant()

override bool ActionTurnOnHeadtorch::IsInstant ( )
inlineprivate

Definition at line 7 of file ActionTurnOnHeadtorch.c.

8 {
9 return true;
10 }

◆ Start()

override void ActionTurnOnHeadtorch::Start ( ActionData action_data)
inlineprivate

Definition at line 46 of file ActionTurnOnHeadtorch.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().CanWork())
55 headtorch.GetCompEM().SwitchOn();
56 }
57 }

◆ UseMainItem()

override bool ActionTurnOnHeadtorch::UseMainItem ( )
inlineprivate

Definition at line 17 of file ActionTurnOnHeadtorch.c.

18 {
19 return false;
20 }

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