Fixed Tomato farming (again)
This commit is contained in:
@@ -81,7 +81,7 @@ public partial class FieldBehaviour2D : Sprite2D
|
||||
int currentSlotIndex = InventoryManager.Instance.CurrentSelectedSlotIndex;
|
||||
ItemInstance? item = InventoryManager.Instance.playerInventory.Slots[currentSlotIndex].itemInstance;
|
||||
|
||||
if (item == null || PlantingPlaceholder.GetChildCount() > 0)
|
||||
if (item == null || PlantingPlaceholder.GetChildCount() > 0 || item.amount == 0)
|
||||
return success;
|
||||
|
||||
string prefabPath = ItemRepository.TryGetPrefabPath(item.blueprint);
|
||||
@@ -98,7 +98,8 @@ public partial class FieldBehaviour2D : Sprite2D
|
||||
{
|
||||
plantBehaviour.Field = this;
|
||||
}
|
||||
|
||||
|
||||
InventoryManager.Instance.playerInventory.RemoveItem(currentSlotIndex);
|
||||
success = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user