5 class SCR_ArsenalInventoryStorageManagerComponent : ScriptedInventoryStorageManagerComponent
7 [
Attribute(
"1",
desc:
"If true it will negate the weight and volume of the items within the arsenal, if false the items within the arsenal will have weight and volume")]
8 protected bool m_bNegateItemWeightAndVolume;
33 EntityPrefabData prefabData = item.GetPrefabData();
45 if (!newArsenalContent)
48 foreach (ResourceName prefab : newArsenalContent)
56 override protected void OnItemAdded(BaseInventoryStorageComponent storageOwner, IEntity item)
58 super.OnItemAdded(storageOwner, item);
61 if (m_bNegateItemWeightAndVolume && Replication.IsServer())
63 if (storageOwner.GetParentSlot())
77 inventoryItem.SetAdditionalVolume(-inventoryItem.GetTotalVolume());
95 override protected void OnItemRemoved(BaseInventoryStorageComponent storageOwner, IEntity item)
97 super.OnItemRemoved(storageOwner, item);
105 if (storageOwner.GetAdditionalWeight() != 0)
106 storageOwner.SetAdditionalWeight(0);
111 if (inventoryItem.GetAdditionalVolume() != 0)
112 inventoryItem.SetAdditionalVolume(0);
119 super.FillInitialPrefabsToStore(prefabsToSpawn);
125 if (!arsenalComponent)
128 array<ResourceName> prefabs = {};
129 arsenalComponent.GetAvailablePrefabs(prefabs);
141 if (!arsenalComponent)