Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_DismantleInventoryItemBaseAction.c
Go to the documentation of this file.
2{
4
5 protected RplComponent m_RplComp;
6
7 //------------------------------------------------------------------------------------------------
8 override bool CanBeShownScript(IEntity user)
9 {
11 return false;
12
13 return m_DeployableItemComp.CanDismantleBeShown(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_DeployableItemComp || !m_RplComp || m_RplComp.IsProxy())
26 return;
27
28 m_DeployableItemComp.Dismantle(pUserEntity);
29 }
30
31 //------------------------------------------------------------------------------------------------
32 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
33 {
35 m_RplComp = RplComponent.Cast(pOwnerEntity.FindComponent(RplComponent));
36 }
37}
proto external Managed FindComponent(typename typeName)
Base class which all deployable inventory items inherit from.
override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
SCR_BaseDeployableInventoryItemComponent m_DeployableItemComp