fix: ensure water usage loop breaks when items are unavailable

This commit is contained in:
2026-01-04 02:32:12 -05:00
parent f3dcdc3ed4
commit a8fbe5a74c

View File

@@ -33,8 +33,9 @@ def plant_grid(width, height, plantWith, waterBelow, requireSoil):
if get_ground_type() != Grounds.Soil: if get_ground_type() != Grounds.Soil:
till() till()
if get_water() < waterBelow: while get_water() < waterBelow:
use_item(Items.Water) if not use_item(Items.Water):
break
index = tracker % len(plantWith) index = tracker % len(plantWith)
tracker += 1 tracker += 1