fix: turtleUtils.tryDrop should return when no item to drop
This commit is contained in:
parent
31298f5735
commit
3e9222dd8d
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user