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_JumpOutUserAction.c
Go to the documentation of this file.
1
class
SCR_JumpOutAction
:
SCR_CompartmentUserAction
2
{
3
//------------------------------------------------------------------------------------------------
4
override
void
PerformAction
(
IEntity
pOwnerEntity,
IEntity
pUserEntity)
5
{
6
if
(!pOwnerEntity)
7
return
;
8
9
ChimeraCharacter
character =
ChimeraCharacter
.Cast(pUserEntity);
10
if
(!character)
11
return
;
12
13
CharacterControllerComponent controller = character.GetCharacterController();
14
if
(controller && controller.IsUnconscious())
15
return
;
16
17
BaseCompartmentSlot
targetCompartment = GetCompartmentSlot();
18
if
(!targetCompartment)
19
return
;
20
21
CompartmentAccessComponent compartmentAccess = character.GetCompartmentAccessComponent();
22
if
(!compartmentAccess)
23
return
;
24
25
if
(!compartmentAccess.GetOutVehicle(
EGetOutType
.ANIMATED,
GetRelevantDoorIndex
(pUserEntity),
ECloseDoorAfterActions
.LEAVE_OPEN,
false
))
26
return
;
27
28
super.PerformAction(pOwnerEntity, pUserEntity);
29
}
30
31
//------------------------------------------------------------------------------------------------
32
override
bool
CanBePerformedScript(
IEntity
user)
33
{
34
ChimeraCharacter
character =
ChimeraCharacter
.Cast(user);
35
if
(!character)
36
return
false
;
37
38
CharacterControllerComponent controller = character.GetCharacterController();
39
if
(controller && controller.IsUnconscious())
40
return
false
;
41
42
CompartmentAccessComponent compartmentAccess = character.GetCompartmentAccessComponent();
43
if
(!compartmentAccess)
44
return
false
;
45
46
if
(!compartmentAccess.IsInCompartment())
47
return
false
;
48
49
if
(compartmentAccess.IsGettingIn() || compartmentAccess.IsGettingOut())
50
return
false
;
51
52
BaseCompartmentSlot
compartment = compartmentAccess.GetCompartment();
53
if
(!compartment)
54
return
false
;
55
56
BaseCompartmentSlot
thisCompartment = GetCompartmentSlot();
57
return
thisCompartment == compartment;
58
}
59
60
//------------------------------------------------------------------------------------------------
61
override
bool
CanBeShownScript(
IEntity
user)
62
{
63
return
CanBePerformed
(user);
64
}
65
66
//------------------------------------------------------------------------------------------------
67
override
bool
GetActionNameScript(out
string
outName)
68
{
69
BaseCompartmentSlot
compartment = GetCompartmentSlot();
70
if
(!compartment)
71
return
false
;
72
73
UIInfo
actionInfo =
GetUIInfo
();
74
if
(!actionInfo)
75
return
false
;
76
77
outName = actionInfo.GetName();
78
79
return
true
;
80
}
81
};
GetUIInfo
SCR_UIInfo GetUIInfo()
Definition
SCR_EditableEntityCampaignBuildingModeLabelSetting.c:27
CanBePerformed
override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags)
Definition
SCR_NewSessionToolbarAction.c:48
BaseCompartmentSlot
Definition
BaseCompartmentSlot.c:2
ChimeraCharacter
Definition
ChimeraCharacter.c:13
IEntity
Definition
IEntity.c:13
SCR_CompartmentUserAction
Definition
SCR_CompartmentUserAction.c:2
SCR_CompartmentUserAction::GetRelevantDoorIndex
int GetRelevantDoorIndex(IEntity caller)
Definition
SCR_CompartmentUserAction.c:46
SCR_JumpOutAction
Definition
SCR_JumpOutUserAction.c:2
UIInfo
UIInfo - allows to define UI elements.
Definition
UIInfo.c:14
PerformAction
@ PerformAction
Definition
EUserActionEvent.c:15
ECloseDoorAfterActions
ECloseDoorAfterActions
Definition
ECloseDoorAfterActions.c:13
EGetOutType
EGetOutType
Definition
EGetOutType.c:13
scripts
Game
UserActions
SCR_JumpOutUserAction.c
Generated by
1.17.0