Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_VehicleConditionManager.c
Go to the documentation of this file.
3{
4 [Attribute()]
5 protected ref array<ref SCR_VehicleConditionCheck> m_aChecks;
6
7 protected bool m_bIsUsable;
8
10
11 //------------------------------------------------------------------------------------------------
19
20 //------------------------------------------------------------------------------------------------
21 SCR_VehicleConditionCheck GetCheck(typename type)
22 {
23 foreach (SCR_VehicleConditionCheck check : m_aChecks)
24 {
25 if (check.Type() == type)
26 return check;
27 }
28
29 return null;
30 }
31
32 //------------------------------------------------------------------------------------------------
33 void AddCheck(notnull SCR_VehicleConditionCheck check)
34 {
35 if (m_aChecks.Contains(check))
36 return;
37
38 m_aChecks.Insert(check);
39 }
40
41 //------------------------------------------------------------------------------------------------
42 SCR_VehicleConditionCheck GetFirstFailedCheck(Vehicle vehicle)
43 {
44 foreach (SCR_VehicleConditionCheck check : m_aChecks)
45 {
46 if (!check.CheckCondition(vehicle))
47 {
48 return check;
49 }
50 }
51
52 return null;
53 }
54
55 //------------------------------------------------------------------------------------------------
60 {
61 foreach (SCR_VehicleConditionCheck check : m_aChecks)
62 {
63 if (!check.CheckCondition(vehicle))
64 {
65 SetIsUsable(false);
66 return m_bIsUsable;
67 }
68 }
69
70 SetIsUsable(true);
71 return m_bIsUsable;
72 }
73
74 //------------------------------------------------------------------------------------------------
76 {
77 return m_bIsUsable;
78 }
79
80 //------------------------------------------------------------------------------------------------
81 protected void SetIsUsable(bool value)
82 {
83 if (m_bIsUsable == value)
84 return;
85
86 m_bIsUsable = value;
87
90 }
91
92 //------------------------------------------------------------------------------------------------
94 {
95 if (!m_aChecks)
96 m_aChecks = {};
97 }
98}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
EDamageType type
ScriptInvokerBase< ScriptInvokerBoolMethod > ScriptInvokerBool
void AddCheck(notnull SCR_VehicleConditionCheck check)
SCR_VehicleConditionCheck GetFirstFailedCheck(Vehicle vehicle)
ref array< ref SCR_VehicleConditionCheck > m_aChecks
SCR_VehicleConditionCheck GetCheck(typename type)
ref ScriptInvokerBool m_OnVehicleUsabilityChanged
enum EPhysicsLayerPresets Vehicle
Definition gameLib.c:24
SCR_FieldOfViewSettings Attribute