Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_VehicleConditionManager.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_VehicleConditionManager
3
{
4
[
Attribute
()]
5
protected
ref array<ref SCR_VehicleConditionCheck>
m_aChecks
;
6
7
protected
bool
m_bIsUsable
;
8
9
protected
ref
ScriptInvokerBool
m_OnVehicleUsabilityChanged
;
10
11
//------------------------------------------------------------------------------------------------
12
ScriptInvokerBool
GetOnVehicleUsabilityChanged
()
13
{
14
if
(!
m_OnVehicleUsabilityChanged
)
15
m_OnVehicleUsabilityChanged
=
new
ScriptInvokerBool
();
16
17
return
m_OnVehicleUsabilityChanged
;
18
}
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
//------------------------------------------------------------------------------------------------
59
bool
IsVehicleUsable
(
Vehicle
vehicle)
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
//------------------------------------------------------------------------------------------------
75
bool
GetIsUsable
()
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
88
if
(
m_OnVehicleUsabilityChanged
)
89
m_OnVehicleUsabilityChanged
.Invoke(
m_bIsUsable
);
90
}
91
92
//------------------------------------------------------------------------------------------------
93
void
SCR_VehicleConditionManager
()
94
{
95
if
(!
m_aChecks
)
96
m_aChecks
= {};
97
}
98
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
type
EDamageType type
Definition
SCR_DestructibleTreeV2.c:32
ScriptInvokerBool
ScriptInvokerBase< ScriptInvokerBoolMethod > ScriptInvokerBool
Definition
SCR_ScriptInvokerHelper.c:41
SCR_VehicleConditionManager::AddCheck
void AddCheck(notnull SCR_VehicleConditionCheck check)
Definition
SCR_VehicleConditionManager.c:33
SCR_VehicleConditionManager::GetFirstFailedCheck
SCR_VehicleConditionCheck GetFirstFailedCheck(Vehicle vehicle)
Definition
SCR_VehicleConditionManager.c:42
SCR_VehicleConditionManager::GetOnVehicleUsabilityChanged
ScriptInvokerBool GetOnVehicleUsabilityChanged()
Definition
SCR_VehicleConditionManager.c:12
SCR_VehicleConditionManager::m_aChecks
ref array< ref SCR_VehicleConditionCheck > m_aChecks
Definition
SCR_VehicleConditionManager.c:5
SCR_VehicleConditionManager::m_bIsUsable
bool m_bIsUsable
Definition
SCR_VehicleConditionManager.c:7
SCR_VehicleConditionManager::SCR_VehicleConditionManager
void SCR_VehicleConditionManager()
Definition
SCR_VehicleConditionManager.c:93
SCR_VehicleConditionManager::GetIsUsable
bool GetIsUsable()
Definition
SCR_VehicleConditionManager.c:75
SCR_VehicleConditionManager::GetCheck
SCR_VehicleConditionCheck GetCheck(typename type)
Definition
SCR_VehicleConditionManager.c:21
SCR_VehicleConditionManager::SetIsUsable
void SetIsUsable(bool value)
Definition
SCR_VehicleConditionManager.c:81
SCR_VehicleConditionManager::IsVehicleUsable
bool IsVehicleUsable(Vehicle vehicle)
Definition
SCR_VehicleConditionManager.c:59
SCR_VehicleConditionManager::m_OnVehicleUsabilityChanged
ref ScriptInvokerBool m_OnVehicleUsabilityChanged
Definition
SCR_VehicleConditionManager.c:9
Vehicle
enum EPhysicsLayerPresets Vehicle
Definition
gameLib.c:24
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
TaskSolver
VehicleCondition
SCR_VehicleConditionManager.c
Generated by
1.17.0