Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
actiontogglenvg.c
Go to the documentation of this file.
2 {
3  void ActionToggleNVG()
4  {
5  }
6 
7  override bool IsInstant()
8  {
9  return true;
10  }
11 
12  override void CreateConditionComponents()
13  {
16  }
17 
18  override typename GetInputType()
19  {
20  return ToggleNVGActionInput;
21  }
22 
23  override bool HasTarget()
24  {
25  return true;
26  }
27 
28  override bool UseMainItem()
29  {
30  return false;
31  }
32 
33  override bool ActionCondition( PlayerBase player, ActionTarget target, ItemBase item )
34  {
35  NVGoggles goggles;
36  Clothing NVmount;
37  NVmount = Clothing.Cast(target.GetObject());
38  if ( !NVmount )
39  return false;
40  goggles = NVGoggles.Cast(NVmount.FindAttachmentBySlotName("NVG"));
41  if ( goggles )
42  return true;
43 
44  return false;
45  }
46 
47  override void Start( ActionData action_data )
48  {
49  super.Start( action_data );
50 
51  NVGoggles goggles;
52  Clothing NVmount;
53 
54  NVmount = Clothing.Cast(action_data.m_Target.GetObject());
55  goggles = NVGoggles.Cast(NVmount.FindAttachmentBySlotName("NVG"));
56 
57  goggles.RotateGoggles(goggles.m_IsLowered);
58  }
59 };
ItemBase
Definition: inventoryitem.c:730
CCINone
Definition: ccinone.c:1
ToggleNVGActionInput
Definition: actioninput.c:835
UAMaxDistances
Definition: actionconstants.c:104
PlayerBase
Definition: playerbaseclient.c:1
Clothing
Definition: armband_colorbase.c:1
ActionTarget
class ActionTargets ActionTarget
ActionData
Definition: actionbase.c:20
CCTNonRuined
Definition: cctnonruined.c:1
ActionBase
void ActionBase()
Definition: actionbase.c:73
m_ConditionItem
ref CCIBase m_ConditionItem
Definition: actionbase.c:55
m_ConditionTarget
ref CCTBase m_ConditionTarget
Definition: actionbase.c:56
ActionToggleNVG
Definition: actiontogglenvg.c:1