fix(tunnels-miner): bad orientation + crash

This commit is contained in:
Guillaume ARM 2024-05-26 04:05:00 +02:00
parent 4091084bea
commit 12a50ebf6a

View File

@ -6,7 +6,7 @@ local TIME_TO_START = 3
local IDLE_TIME_BETWEEN_TUNNELS = 1
local SPACE_BETWEEN_TUNNELS = 3
local VERSION = "1.0.2"
local VERSION = "1.0.3"
local MOVES_BY_DIRECTION = {
right = {
@ -97,7 +97,7 @@ end
local function dropAllProcedure(config)
turtleUtils.forceDown()
getMoves(config).turnLeft()
getMoves(config).turnRight()
-- try to refuel before dropping items
turtleUtils.refuel(getMinFuelNeeded(config), turtle.suck, IDLE_TIME)
@ -116,12 +116,12 @@ local function dropAllProcedure(config)
end
end
getMoves(config).turnRight()
getMoves(config).turnLeft()
turtleUtils.forceUp()
end
local function goToNextMineProcedure(config)
getMoves(config).turnRight()
getMoves(config).turnLeft()
digForward(SPACE_BETWEEN_TUNNELS)
getMoves(config).turnLeft()
end
@ -143,7 +143,7 @@ local function main(config)
local tunnelNumber = 1
while true do
if tunnelNumber > 1 then
printFuelReport()
printFuelReport(config)
assertEnoughFuelForTunnel(config)
end
assertInventoryIsEmpty() -- Warning here when implementing persistance