remove check at the end of VP_splitstack and add some stuff to move

This commit is contained in:
Justus Wolff
2026-02-23 00:37:55 +01:00
parent a284cc6c87
commit 0c6185f67e

View File

@@ -309,14 +309,18 @@ local function move(direction, continousattempt)
while true do while true do
if turtle.getFuelLevel() == 0 then if turtle.getFuelLevel() == 0 then
reset() reset()
print("Out of fuel! Please insert fuel into current slot.") print("Out of fuel! Trying to refuel.")
while true do while true do
local suc = turtle.refuel(64) local suc = turtle.refuel(64)
if suc then if suc then
print("Refuelled. Press enter to continue.")
read("")
break break
end end
local current = turtle.getSelectedSlot()
if current == 16 then
turtle.select(1)
else
turtle.select(current+1)
end
os.sleep(1) os.sleep(1)
end end
end end
@@ -325,6 +329,9 @@ local function move(direction, continousattempt)
printError(reason) printError(reason)
print("Resolve the error and press enter to continue.") print("Resolve the error and press enter to continue.")
read("") read("")
elseif not suc and continousattempt then
reset()
printError("Failure moving "..direction.." Continous attempt true.")
elseif suc then elseif suc then
break break
end end
@@ -669,7 +676,7 @@ local function VP_splitstack(_stack, x)
buf[i] = v buf[i] = v
ind = ind + 1 ind = ind + 1
end end
if #buf > 0 then table.insert(stacks, buf) end table.insert(stacks, buf)
local out = { local out = {
height=height, height=height,