3 [
Attribute(
"1",
desc:
"Check if magazines or projectiles in owner storage. If not it will not allow to resupply. Used in tandum with arsenals")]
4 protected bool m_bCheckIfItemInStorage;
6 [
Attribute(
"0",
desc:
"If true allows to get storage manager from parent if not on self. Storagemanager is used to check if magazine is in the storage and is used in tandum with arsenal. Ignored if m_bCheckIfMagazineInStorage is false.")]
7 protected bool m_bAllowGetStorageFromParent;
12 protected override void SetTargetInventory(IEntity user, IEntity owner)
14 m_InventoryManagerTarget = SCR_InventoryStorageManagerComponent.Cast(user.FindComponent(SCR_InventoryStorageManagerComponent));
18 override bool CanBeShownScript(IEntity user)
20 if (!super.CanBeShownScript(user))
23 bool canPerform = super.CanBePerformedScript(user);
31 override bool CanBePerformedScript(IEntity user)
39 return m_InventoryManagerProvider;
43 protected override void ResetReferencesOnServer()
46 super.ResetReferencesOnServer();
50 override void Init(IEntity pOwnerEntity, GenericComponent pManagerComponent)
52 super.Init(pOwnerEntity, pManagerComponent);
55 if (m_bCheckIfItemInStorage)
58 if (!m_InventoryManagerProvider && m_bAllowGetStorageFromParent && pOwnerEntity.GetParent())
61 if (!m_InventoryManagerProvider)
62 Print(
string.Format(
"'SCR_ResupplySelfSupportStationAction': %1 should check if Item is in storage but no storage manager found so this step will be ignored!", pOwnerEntity.GetName()), LogLevel.ERROR);