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

Private Member Functions

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

Constructor & Destructor Documentation

◆ ActionTurnOnHelmetFlashlight()

void ActionTurnOnHelmetFlashlight::ActionTurnOnHelmetFlashlight ( )
inlineprivate

Definition at line 3 of file ActionTurnOnHelmetFlashlight.c.

4 {
5 }

Member Function Documentation

◆ ActionCondition()

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

Definition at line 33 of file ActionTurnOnHelmetFlashlight.c.

34 {
37 helmet = Mich2001Helmet.Cast(target.GetObject());
38 if (!helmet)
39 return false;
40 light = Switchable_Base.Cast(helmet.FindAttachmentBySlotName("helmetFlashlight"));
41 if (!light)
42 return false;
43
44 if (light.HasEnergyManager() && light.GetCompEM().CanSwitchOn() && light.GetCompEM().CanWork()) //TODO review conditions for turning off
45 return true;
46
47 return false;
48 }

◆ CreateConditionComponents()

override void ActionTurnOnHelmetFlashlight::CreateConditionComponents ( )
inlineprivate

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

Definition at line 28 of file ActionTurnOnHelmetFlashlight.c.

◆ HasTarget()

override bool ActionTurnOnHelmetFlashlight::HasTarget ( )
inlineprivate

Definition at line 12 of file ActionTurnOnHelmetFlashlight.c.

13 {
14 return true;
15 }

◆ IsInstant()

override bool ActionTurnOnHelmetFlashlight::IsInstant ( )
inlineprivate

Definition at line 7 of file ActionTurnOnHelmetFlashlight.c.

8 {
9 return true;
10 }

◆ Start()

override void ActionTurnOnHelmetFlashlight::Start ( ActionData action_data)
inlineprivate

Definition at line 50 of file ActionTurnOnHelmetFlashlight.c.

51 {
52 super.Start(action_data);
53
54 Switchable_Base light;// = Switchable_Base.Cast(action_data.m_MainItem.FindAttachmentBySlotName("helmetFlashlight"));
56 helmet = Mich2001Helmet.Cast(action_data.m_Target.GetObject());
57 light = Switchable_Base.Cast(helmet.FindAttachmentBySlotName("helmetFlashlight"));
58
59 if (light.HasEnergyManager())
60 {
61 if (light.GetCompEM().CanWork())
62 light.GetCompEM().SwitchOn();
63 }
64 }

◆ UseMainItem()

override bool ActionTurnOnHelmetFlashlight::UseMainItem ( )
inlineprivate

Definition at line 17 of file ActionTurnOnHelmetFlashlight.c.

18 {
19 return false;
20 }

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