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_DoorUserAction.c
Go to the documentation of this file.
1
3
class
SCR_DoorUserAction
:
DoorUserAction
4
{
5
//------------------------------------------------------------------------------------------------
6
override
void
PerformAction
(
IEntity
pOwnerEntity,
IEntity
pUserEntity)
7
{
8
BaseDoorComponent
doorComponent = GetDoorComponent();
9
if
(doorComponent)
10
{
11
doorComponent.UseDoorAction(pUserEntity);
12
}
13
14
super.PerformAction(pOwnerEntity, pUserEntity);
15
}
16
17
//------------------------------------------------------------------------------------------------
18
override
bool
CanBePerformedScript(
IEntity
user)
19
{
20
if
(GetDoorComponent())
21
return
true
;
22
23
return
false
;
24
}
25
26
//------------------------------------------------------------------------------------------------
27
override
bool
GetActionNameScript(out
string
outName)
28
{
29
auto
doorComponent = GetDoorComponent();
30
// Logic here is flipped since method returns the opposite of what we expect
31
if
(doorComponent &&
Math
.AbsFloat(doorComponent.GetControlValue()) >= 0.5)
32
outName =
"#AR-UserAction_Close"
;
33
else
34
outName =
"#AR-UserAction_Open"
;
35
36
return
true
;
37
}
38
39
};
40
41
class
SCR_LadderDoorUserAction
:
SCR_DoorUserAction
42
{
43
// Kept only for compatibility reasons. It's the same as SCR_DoorUserAction
44
};
BaseDoorComponent
Definition
BaseDoorComponent.c:13
DoorUserAction
Definition
DoorUserAction.c:13
IEntity
Definition
IEntity.c:13
Math
Definition
Math.c:13
SCR_DoorUserAction
Definition
SCR_DoorUserAction.c:4
SCR_LadderDoorUserAction
Definition
SCR_DoorUserAction.c:42
PerformAction
@ PerformAction
Definition
EUserActionEvent.c:15
scripts
Game
UserActions
SCR_DoorUserAction.c
Generated by
1.17.0