Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TurretGetInUserAction.c
Go to the documentation of this file.
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
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};
override bool CanBePerformedScript(IEntity user)
IEntity GetOwner()
Owner entity of the fuel tank.
EDamageState