fix: miner.finished condition
This commit is contained in:
parent
86caa737e9
commit
4cfee8d445
@ -106,7 +106,7 @@ local function refuelProcedure()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function returnMineProcedure()
|
local function returnMineProcedure()
|
||||||
if miner.robot.finished then
|
if miner.finished then
|
||||||
miner.mission = nil -- it will stop the loop
|
miner.mission = nil -- it will stop the loop
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -184,7 +184,7 @@ local function mineProcedure()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if turtleUtils.countFreeSlots() < 1 then
|
if turtleUtils.countFreeSlots() < 1 then
|
||||||
print('> Starting return home procedure because inventory is empty...')
|
print('> Starting return home procedure because inventory is almost full...')
|
||||||
miner.mission = 'return-home'
|
miner.mission = 'return-home'
|
||||||
miner.lastPositionState = miner.robot.getState()
|
miner.lastPositionState = miner.robot.getState()
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user