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_TurretPickUpItemAction.c
Go to the documentation of this file.
1
class
SCR_TurretPickUpItemAction
:
ScriptedUserAction
2
{
3
//------------------------------------------------------------------------------------------------
4
override
bool
CanBePerformedScript(
IEntity
user)
5
{
6
if
(!IsTurretDisassembled())
7
return
false
;
8
9
return
false
;
10
}
11
12
//------------------------------------------------------------------------------------------------
13
bool
IsTurretDisassembled()
14
{
15
/*
16
GenericEntity genOwner = GenericEntity.Cast(m_Owner);
17
18
// Check if turret has an occupant
19
auto controller =TurretControllerComponent.Cast(genOwner.FindComponent(TurretControllerComponent));
20
if(!controller)
21
return false;
22
auto compartment = controller.GetCompartmentSlot();
23
if(compartment && compartment.GetOccupant())
24
return false;
25
26
// Check if destroyed
27
auto damageManagerComponent = DamageManagerComponent.Cast(genOwner.FindComponent(DamageManagerComponent));
28
if (damageManagerComponent && damageManagerComponent.GetState() != EDamageState.ALIVE)
29
return false;
30
31
// Check WeaponSlot
32
auto genericWeaponSlotComponent = genOwner.FindComponent(WeaponSlotComponent);
33
if (!genericWeaponSlotComponent)
34
return false;
35
auto weaponSlotComponent = WeaponSlotComponent.Cast(genericWeaponSlotComponent);
36
IEntity weaponEntityInSlot = weaponSlotComponent.GetWeaponEntity();
37
if(weaponEntityInSlot)
38
return false;
39
*/
40
return
true
;
41
}
42
};
IEntity
Definition
IEntity.c:13
SCR_TurretPickUpItemAction
Definition
SCR_TurretPickUpItemAction.c:2
ScriptedUserAction
Definition
ScriptedUserAction.c:13
scripts
Game
UserActions
SCR_TurretPickUpItemAction.c
Generated by
1.17.0