Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
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 (!super.CanBeShownScript(user))
14  return false;
15 
16  bool canPerform = super.CanBePerformedScript(user);
17  if (!canPerform && GetShowButDisabled())
18  return true;
19 
20  return canPerform;
21  }
22 
23  //------------------------------------------------------------------------------------------------
24  override bool CanBePerformedScript(IEntity user)
25  {
26  return !GetShowButDisabled();
27  }
28 
29  //------------------------------------------------------------------------------------------------
30  protected override bool RequiresGadget()
31  {
32  return true;
33  }
34 
35  //------------------------------------------------------------------------------------------------
36  protected override bool PrioritizeHeldGadget()
37  {
38  return true;
39  }
40 
41  //------------------------------------------------------------------------------------------------
42  protected override void DelayedInit(IEntity owner)
43  {
44  if (!owner)
45  return;
46 
47  super.DelayedInit(owner);
48 
49  //~ Set target as owner inventory no need to ever change it
50  m_InventoryManagerTarget = SCR_InventoryStorageManagerComponent.Cast(owner.FindComponent(SCR_InventoryStorageManagerComponent));
51  }
52 }
SCR_ResupplyOtherSupportStationAction
Definition: SCR_ResupplyOtherSupportStationAction.c:1
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
GetShowButDisabled
protected bool GetShowButDisabled()
Definition: SCR_ResupplySupportStationAction.c:52
Attribute
typedef Attribute
Post-process effect of scripted camera.
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
m_InventoryManagerTarget
protected SCR_InventoryStorageManagerComponent m_InventoryManagerTarget
Definition: SCR_ResupplySupportStationAction.c:20
SCR_BaseResupplySupportStationAction
Definition: SCR_ResupplySupportStationAction.c:3