Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_DeployInventoryItemBaseAction.c
Go to the documentation of this file.
2 {
3  protected SCR_BaseDeployableInventoryItemComponent m_DeployableItemComp;
4 
5  protected RplComponent m_RplComp;
6 
7  //------------------------------------------------------------------------------------------------
8  override bool CanBeShownScript(IEntity user)
9  {
10  if (!m_DeployableItemComp)
11  return false;
12 
13  return m_DeployableItemComp.CanDeployBeShown(user);
14  }
15 
16  //------------------------------------------------------------------------------------------------
17  override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
18  {
19  if (!m_DeployableItemComp || !m_RplComp || m_RplComp.IsProxy())
20  return;
21 
22  m_DeployableItemComp.Deploy(pUserEntity);
23  }
24 
25  //------------------------------------------------------------------------------------------------
26  override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
27  {
28  IEntity owner = GetOwner();
29  if (!owner)
30  return;
31 
32  m_DeployableItemComp = SCR_BaseDeployableInventoryItemComponent.Cast(owner.FindComponent(SCR_BaseDeployableInventoryItemComponent));
33  m_RplComp = RplComponent.Cast(owner.FindComponent(RplComponent));
34  }
35 }
ScriptedUserAction
Definition: ScriptedUserAction.c:12
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
SCR_DeployInventoryItemBaseAction
Definition: SCR_DeployInventoryItemBaseAction.c:1