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_CanOperateVehicleDoorCondition.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_CanOperateVehicleDoorCondition
:
SCR_AvailableActionCondition
3
{
4
[
Attribute
(
desc
:
"Requires the door to be open"
)]
5
protected
bool
m_bRequireOpenDoor
;
6
7
[
Attribute
(
SCR_ECompartmentDoorType
.DOOR.ToString(), uiwidget:
UIWidgets
.ComboBox,
desc
:
"Checks if door assigned to current compartment is a hatch"
, enumType:
SCR_ECompartmentDoorType
)]
8
protected
SCR_ECompartmentDoorType
m_eDoorType
;
9
10
//------------------------------------------------------------------------------------------------
11
override
bool
IsAvailable
(notnull
SCR_AvailableActionsConditionData
data
)
12
{
13
ChimeraCharacter
character =
data
.GetCharacter();
14
if
(!character)
15
return
GetReturnResult
(
false
);
16
17
CompartmentAccessComponent compartmentAccessComp = character.GetCompartmentAccessComponent();
18
if
(!compartmentAccessComp)
19
return
GetReturnResult
(
false
);
20
21
if
(compartmentAccessComp.IsGettingIn() || compartmentAccessComp.IsGettingOut() || compartmentAccessComp.IsSwitchingSeatsAnim())
22
return
GetReturnResult
(
false
);
23
24
BaseCompartmentSlot
compartment = compartmentAccessComp.GetCompartment();
25
if
(!compartment)
26
return
GetReturnResult
(
false
);
27
28
array<int> arr = {};
29
compartment.GetAvailableDoorIndices(arr);
30
if
(arr.IsEmpty())
31
return
GetReturnResult
(
false
);
32
33
int
mainDoorId = arr[0];
34
if
(mainDoorId == compartment.GetTurnOutDoorIndex())
35
return
GetReturnResult
(
false
);
36
37
BaseCompartmentManagerComponent
compartmentManager = compartment.GetManager();
38
if
(!compartmentManager)
39
return
GetReturnResult
(
false
);
40
41
if
(compartmentManager.IsDoorFake(mainDoorId))
42
return
GetReturnResult
(
false
);
43
44
SCR_CompartmentDoorInfo
doorInfo =
SCR_CompartmentDoorInfo
.Cast(compartmentManager.GetDoorInfo(mainDoorId));
45
SCR_ECompartmentDoorType
doorType =
SCR_ECompartmentDoorType
.DOOR;
//we assume that if there is no info about the door type then it must be a door
46
if
(doorInfo)
47
doorType = doorInfo.
GetDoorType
();
48
49
if
(doorType !=
m_eDoorType
)
50
return
GetReturnResult
(
false
);
51
52
if
(!
m_bRequireOpenDoor
&& !compartmentAccessComp.CanAccessDoor(compartment.GetOwner(), compartmentManager, mainDoorId))
53
return
GetReturnResult
(
false
);
54
55
return
GetReturnResult
(compartmentManager.IsDoorOpen(mainDoorId) ==
m_bRequireOpenDoor
);
56
}
57
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_ECompartmentDoorType
SCR_ECompartmentDoorType
Definition
SCR_ECompartmentDoorType.c:2
data
Get all prefabs that have the spawner data
Definition
SCR_EntityCatalogManagerComponent.c:320
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
BaseCompartmentManagerComponent
Definition
BaseCompartmentManagerComponent.c:13
BaseCompartmentSlot
Definition
BaseCompartmentSlot.c:2
ChimeraCharacter
Definition
ChimeraCharacter.c:13
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_AvailableActionsConditionData
Definition
SCR_AvailableActionsConditionData.c:6
SCR_CanOperateVehicleDoorCondition
Definition
SCR_CanOperateVehicleDoorCondition.c:3
SCR_CanOperateVehicleDoorCondition::m_bRequireOpenDoor
bool m_bRequireOpenDoor
Definition
SCR_CanOperateVehicleDoorCondition.c:5
SCR_CanOperateVehicleDoorCondition::m_eDoorType
SCR_ECompartmentDoorType m_eDoorType
Definition
SCR_CanOperateVehicleDoorCondition.c:8
SCR_CanOperateVehicleDoorCondition::IsAvailable
override bool IsAvailable(notnull SCR_AvailableActionsConditionData data)
Definition
SCR_CanOperateVehicleDoorCondition.c:11
SCR_CompartmentDoorInfo
Definition
SCR_CompartmentDoorInfo.c:2
SCR_CompartmentDoorInfo::GetDoorType
SCR_ECompartmentDoorType GetDoorType()
Definition
SCR_CompartmentDoorInfo.c:7
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
scripts
Game
UI
HUD
AvailableActions
Conditions
Game
Vehicle
SCR_CanOperateVehicleDoorCondition.c
Generated by
1.17.0