Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ResupplyOtherSupportStationAction.c
Go to the documentation of this file.
2{
3 [Attribute("0", desc: "If false both player and AI have this action. If true then the resupply action is only availible for player or possessed characters")]
4 protected bool m_bPlayerOnly;
5
6 //------------------------------------------------------------------------------------------------
7 override bool CanBeShownScript(IEntity user)
8 {
9 //~ Hide if not player or not possessed
10 if (m_bPlayerOnly && SCR_PossessingManagerComponent.GetPlayerIdFromControlledEntity(GetOwner()) <= 0)
11 return false;
12
13 if (!SCR_ArsenalManagerComponent.IsArsenalTypeEnabled_Static(SCR_EArsenalTypes.GADGETS))
14 return false;
15
16 if (!super.CanBeShownScript(user))
17 return false;
18
19 bool canPerform = super.CanBePerformedScript(user);
20 if (!canPerform && GetShowButDisabled())
21 return true;
22
23 return canPerform;
24 }
25
26 //------------------------------------------------------------------------------------------------
27 override bool CanBePerformedScript(IEntity user)
28 {
29 return !GetShowButDisabled();
30 }
31
32 //------------------------------------------------------------------------------------------------
33 protected override bool RequiresGadget()
34 {
35 return true;
36 }
37
38 //------------------------------------------------------------------------------------------------
39 protected override bool PrioritizeHeldGadget()
40 {
41 return true;
42 }
43
44 //------------------------------------------------------------------------------------------------
45 protected override void DelayedInit(IEntity owner)
46 {
47 if (!owner)
48 return;
49
50 super.DelayedInit(owner);
51
52 //~ Set target as owner inventory no need to ever change it
53 m_InventoryManagerTarget = SCR_InventoryStorageManagerComponent.Cast(owner.FindComponent(SCR_InventoryStorageManagerComponent));
54 }
55}
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external Managed FindComponent(typename typeName)
SCR_InventoryStorageManagerComponent m_InventoryManagerTarget
IEntity GetOwner()
Owner entity of the fuel tank.
SCR_FieldOfViewSettings Attribute