Dayz Explorer 1.29.162510
Loading...
Searching...
No Matches
actiontogglenvg.c
Go to the documentation of this file.
2{
3 override bool IsInstant()
4 {
5 return true;
6 }
7
8 override void CreateConditionComponents()
9 {
12 }
13
14 override typename GetInputType()
15 {
17 }
18
19 override bool HasTarget()
20 {
21 return true;
22 }
23
24 override bool UseMainItem()
25 {
26 return false;
27 }
28
29 override bool ActionCondition(PlayerBase player, ActionTarget target, ItemBase item)
30 {
31 if (target.GetObject() != null)
32 return true;
33
34 return false;
35 }
36
37 override void Start(ActionData action_data)
38 {
39 super.Start(action_data);
40
42 query.m_Category = ECachedEquipmentItemCategory.NVG;
43 query.m_Placement = ECachedEquipmentPlacement.ATTACHMENT;
44 query.m_MaximumDepth = 2;
45
46 array<Entity> nvgs = action_data.m_Player.GetCachedEquipment().GetEntitiesByCategory(query);
47 foreach (Entity nvg : nvgs)
48 {
49 NVGoggles goggles;
50 if (NVGoggles.CastTo(goggles, nvg))
51 {
52 goggles.RotateGoggles(goggles.m_IsLowered);
53 break;
54 }
55 }
56 }
57}
ActionBase ActionData
Definition actionbase.c:30
bool HasTarget()
Definition actionbase.c:250
void ActionBase()
Definition actionbase.c:88
ref CCIBase m_ConditionItem
Definition actionbase.c:70
bool IsInstant()
Definition actionbase.c:268
bool UseMainItem()
Definition actionbase.c:391
void CreateConditionComponents()
Definition actionbase.c:236
ref CCTBase m_ConditionTarget
Definition actionbase.c:71
Definition camera.c:2
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
ECachedEquipmentPlacement
void Start()
Plays all elements this effects consists of.
Definition effect.c:157