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

Private Member Functions

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

Constructor & Destructor Documentation

◆ ActionTurnOffHelmetFlashlight()

void ActionTurnOffHelmetFlashlight::ActionTurnOffHelmetFlashlight ( )
inlineprivate

Definition at line 3 of file ActionTurnOffHelmetFlashlight.c.

4 {
5 }

Member Function Documentation

◆ ActionCondition()

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

Definition at line 33 of file ActionTurnOffHelmetFlashlight.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().CanSwitchOff()) //TODO review conditions for turning off
45 return true;
46
47 return false;
48 }

◆ CreateConditionComponents()

override void ActionTurnOffHelmetFlashlight::CreateConditionComponents ( )
inlineprivate

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

Definition at line 28 of file ActionTurnOffHelmetFlashlight.c.

◆ HasTarget()

override bool ActionTurnOffHelmetFlashlight::HasTarget ( )
inlineprivate

Definition at line 12 of file ActionTurnOffHelmetFlashlight.c.

13 {
14 return true;
15 }

◆ IsInstant()

override bool ActionTurnOffHelmetFlashlight::IsInstant ( )
inlineprivate

Definition at line 7 of file ActionTurnOffHelmetFlashlight.c.

8 {
9 return true;
10 }

◆ Start()

override void ActionTurnOffHelmetFlashlight::Start ( ActionData action_data)
inlineprivate

Definition at line 50 of file ActionTurnOffHelmetFlashlight.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().IsSwitchedOn())
62 light.GetCompEM().SwitchOff();
63 }
64 }

◆ UseMainItem()

override bool ActionTurnOffHelmetFlashlight::UseMainItem ( )
inlineprivate

Definition at line 17 of file ActionTurnOffHelmetFlashlight.c.

18 {
19 return false;
20 }

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