Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ResupplyRocketPodSupportStationAction.c
Go to the documentation of this file.
2{
4
5 protected int m_iTotalBarrelCount;
6 protected int m_iFullBarrelCount;
7
8 //------------------------------------------------------------------------------------------------
9 override bool CanBeShownScript(IEntity user)
10 {
11 //~ Not valid or has no parent
13 return false;
14
15 return super.CanBeShownScript(user);
16 }
17
18 //------------------------------------------------------------------------------------------------
19 override bool CanBePerformedScript(IEntity user)
20 {
21 if (!super.CanBePerformedScript(user))
22 return false;
23
24 if (!m_RocketMuzzleComp.CanReloadNextBarrel())
25 {
26 SetCanPerform(false, ESupportStationReasonInvalid.RESUPPLY_INVENTORY_FULL);
27 return false;
28 }
29
31
32 for (int i = 0; i < m_iTotalBarrelCount; i++)
33 {
34 if (!m_RocketMuzzleComp.CanReloadBarrel(i))
36 }
37
39 return true;
40
41 return false;
42 }
43
44 //------------------------------------------------------------------------------------------------
49
50 //------------------------------------------------------------------------------------------------
51 protected override void DelayedInit(IEntity owner)
52 {
53 super.DelayedInit(owner);
54
57 return;
58
59 m_iTotalBarrelCount = m_RocketMuzzleComp.GetBarrelsCount();
60 }
61
62 //------------------------------------------------------------------------------------------------
63 protected override string GetActionStringParam()
64 {
66 return string.Empty;
67
69 }
70}
void SetCanPerform(bool canPerform, ESupportStationReasonInvalid reasonInvalid)
IEntity GetOwner()
Owner entity of the fuel tank.