public void Scavenge(Scavenging_Location location) { previousScavengeItems = location.Scavenge(); foreach (Item_And_Quantity scavengedItem in previousScavengeItems) { storageManager.AddQuantity(scavengedItem); } }
void OnClickCraft() { Item_And_Quantity craftedItem = new Item_And_Quantity(selectedItemToCraft, 1); storageManager.AddQuantity(craftedItem); foreach (Item_And_Quantity requiredItem in selectedItemToCraft.requiredMaterialsToCraft.requiredItems) { storageManager.SubtractQuantity(requiredItem); } RepopulateItems(); OnClickCraftableItem(selectedItemToCraft); }