Fix quarry boundary conditions

This commit is contained in:
Gabriel Tofvesson 2024-12-01 04:37:58 +01:00
parent 9177394fd0
commit b10bc73833

View File

@ -105,7 +105,8 @@ local function dig(checkRefuel)
end
local function line(length, turn, checkRefuel)
for i=1,length do
turtle.digDown()
for i=2,length do
dig(checkRefuel)
end
turn()
@ -114,13 +115,15 @@ end
local function panel(width, length, leftFirst, checkRefuel, checkFullInv)
Logger:trace("Panel:", width, length)
local turn, otherTurn = leftFirst and turtle.turnLeft or turtle.turnRight, leftFirst and turtle.turnRight or turtle.turnLeft
for i=1,width do
for i=2,width do
checkFullInv()
line(length, turn, checkRefuel)
dig(checkRefuel)
turn()
turn, otherTurn = otherTurn, turn
end
line(length, turn, checkRefuel)
turn()
end
local function rectPrism(depth, width, length, leftFirst)