fix: turtleUtils.tryDrop should return when no item to drop

This commit is contained in:
Guillaume ARM 2024-05-08 21:31:17 +02:00
parent 31298f5735
commit 3e9222dd8d

View File

@ -25,7 +25,17 @@ turtleUtils.trySuckUp = function()
end
turtleUtils.tryDrop = function()
while not turtle.drop() do
while true do
if turtle.getItemCount() == 0 then
return false
end
local dropOk = turtle.drop();
if (dropOk) then
return true
end
os.sleep(IDLE_TIME)
end
end