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_VehicleGearCondition.c
Go to the documentation of this file.
1
enum
EVehicleGearboxGear
2
{
3
REVERSE
,
4
NEUTRAL
,
5
FORWARD
,
6
FIRST
,
7
LAST
8
}
9
11
[
BaseContainerProps
()]
12
class
SCR_VehicleGearCondition :
SCR_AvailableActionCondition
13
{
14
[
Attribute
(defvalue: SCR_Enum.GetDefault(
EVehicleGearboxGear
.FORWARD), uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(
EVehicleGearboxGear
))]
15
protected
EVehicleGearboxGear
m_eVehicleGearboxGear;
16
17
//------------------------------------------------------------------------------------------------
20
override
bool
IsAvailable
(notnull SCR_AvailableActionsConditionData
data
)
21
{
22
CarControllerComponent controller = CarControllerComponent.Cast(
data
.GetCurrentVehicleController());
23
if
(!controller)
24
return
false
;
25
26
VehicleWheeledSimulation simulation = controller.GetSimulation();
27
if
(!simulation)
28
return
false
;
29
30
int
currentGear = simulation.GetGear();
31
int
gearsCount = simulation.GearboxGearsCount();
32
int
neutralGear = gearsCount - simulation.GearboxForwardGearsCount() - 1;
33
34
bool
result;
35
if
(m_eVehicleGearboxGear ==
EVehicleGearboxGear
.REVERSE)
36
result = currentGear < neutralGear;
37
else
if
(m_eVehicleGearboxGear ==
EVehicleGearboxGear
.NEUTRAL)
38
result = currentGear == neutralGear;
39
else
if
(m_eVehicleGearboxGear ==
EVehicleGearboxGear
.FORWARD)
40
result = currentGear > neutralGear;
41
else
if
(m_eVehicleGearboxGear ==
EVehicleGearboxGear
.FIRST)
42
result = currentGear == neutralGear + 1;
43
else
if
(m_eVehicleGearboxGear ==
EVehicleGearboxGear
.LAST)
44
result = currentGear == gearsCount - 1;
45
46
return
GetReturnResult
(result);
47
}
48
}
NEUTRAL
@ NEUTRAL
Definition
EGameOverTypes.c:11
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
FORWARD
enum SCR_EAICombatMoveRequestType FORWARD
LAST
SCR_AIGroupInfoComponentClass LAST
data
Get all prefabs that have the spawner data
Definition
SCR_EntityCatalogManagerComponent.c:320
EVehicleGearboxGear
EVehicleGearboxGear
Definition
SCR_VehicleGearCondition.c:2
FIRST
@ FIRST
Definition
SCR_VehicleGearCondition.c:6
REVERSE
@ REVERSE
Definition
SCR_VehicleGearCondition.c:3
SCR_AvailableActionCondition
A single available action condition representation.
Definition
SCR_AvailableActionCondition.c:4
SCR_AvailableActionCondition::GetReturnResult
bool GetReturnResult(bool desiredResult)
Definition
SCR_AvailableActionCondition.c:22
SCR_AvailableActionCondition::IsAvailable
bool IsAvailable(notnull SCR_AvailableActionsConditionData data)
Definition
SCR_AvailableActionCondition.c:35
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UI
HUD
AvailableActions
Conditions
Game
Vehicle
SCR_VehicleGearCondition.c
Generated by
1.17.0