Added resource harvesting to DSL.
This commit is contained in:
@@ -12,6 +12,7 @@ public class Inventory
|
||||
Item inventoryItem = inventory.Find(x => x.data.Id == item.data.Id && x.currentAmount + amount <= x.data.StackSize);
|
||||
if (inventoryItem != null)
|
||||
{
|
||||
GD.Print(inventory.IndexOf(inventoryItem) + ": " + inventoryItem.currentAmount);
|
||||
inventoryItem.currentAmount += amount;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user