5 FuelManagerComponent m_FuelManager;
6 SCR_DamageManagerComponent m_DamageComponent;
9 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
11 super.Init(pOwnerEntity, pManagerComponent);
13 m_FuelManager = FuelManagerComponent.Cast(pOwnerEntity.FindComponent(FuelManagerComponent));
14 m_DamageComponent = SCR_DamageManagerComponent.GetDamageManager(pOwnerEntity);
17 GetGame().GetCallqueue().CallLater(DelayedInit, param1: pOwnerEntity);
21 protected void DelayedInit(IEntity owner)
26 ActionsManagerComponent actionManager = ActionsManagerComponent.Cast(owner.FindComponent(ActionsManagerComponent));
30 array<BaseUserAction> userActions = {};
31 actionManager.GetActionsList(userActions);
36 if (m_RefuelActionPair)
42 override bool CanBeShownScript(IEntity user)
44 if (!super.CanBeShownScript(user))
51 if (m_DamageComponent && m_DamageComponent.GetState() ==
EDamageState.DESTROYED)
55 if (m_RefuelActionPair)
67 override bool CanBePerformedScript(IEntity user)
73 override void PerformAction(IEntity pOwnerEntity, IEntity pUserEntity)
76 super.PerformAction(pOwnerEntity, pUserEntity);
79 if (SCR_PossessingManagerComponent.GetPlayerIdFromControlledEntity(pUserEntity) !=
SCR_PlayerController.GetLocalPlayerId())