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_TurretGetInUserAction.c
Go to the documentation of this file.
1
class
SCR_TurretGetInUserAction
:
SCR_GetInUserAction
2
{
3
//------------------------------------------------------------------------------------------------
4
override
bool
CanBePerformedScript(
IEntity
user)
5
{
6
if
(!IsTurretOperational())
7
return
false
;
8
9
return
super.
CanBePerformedScript
(user);
10
}
11
12
//------------------------------------------------------------------------------------------------
13
override
bool
CanBeShownScript(
IEntity
user)
14
{
15
if
(!IsTurretOperational())
16
return
false
;
17
18
return
super.CanBeShownScript(user);
19
}
20
21
//------------------------------------------------------------------------------------------------
22
bool
IsTurretOperational()
23
{
24
// Check if destroyed
25
DamageManagerComponent
damageManager =
DamageManagerComponent
.Cast(
GetOwner
().FindComponent(
DamageManagerComponent
));
26
if
(damageManager && damageManager.GetState() ==
EDamageState
.DESTROYED)
27
return
false
;
28
29
// Check WeaponSlot
30
WeaponSlotComponent
weaponSlot =
WeaponSlotComponent
.Cast(
GetOwner
().FindComponent(
WeaponSlotComponent
));
31
if
(!weaponSlot)
32
return
false
;
33
34
if
(!weaponSlot.GetWeaponEntity())
35
return
false
;
36
37
return
true
;
38
}
39
};
DamageManagerComponent
Definition
DamageManagerComponent.c:13
IEntity
Definition
IEntity.c:13
SCR_GetInUserAction
Definition
SCR_GetInUserAction.c:2
SCR_GetInUserAction::CanBePerformedScript
override bool CanBePerformedScript(IEntity user)
Definition
SCR_GetInUserAction.c:55
SCR_TurretGetInUserAction
Definition
SCR_TurretGetInUserAction.c:2
WeaponSlotComponent
Definition
WeaponSlotComponent.c:13
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition
SCR_FuelNode.c:128
EDamageState
EDamageState
Definition
EDamageState.c:13
scripts
Game
UserActions
SCR_TurretGetInUserAction.c
Generated by
1.17.0