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