fix(inferium-harvester): replant procedure

This commit is contained in:
Guillaume ARM 2024-05-20 19:26:32 +02:00
parent daa36c82de
commit 6b4e4f248d

View File

@ -140,7 +140,7 @@ end
local function retrieveHomePositionProcedure() local function retrieveHomePositionProcedure()
if turtleUtils.getInventory('bottom') then if turtleUtils.getInventory('bottom') then
retrieveChestFuelOrientation() retrieveChestFuelOrientation()
turtle.turnLeft() return
end end
turtle.turnRight() turtle.turnRight()
@ -412,10 +412,15 @@ local function replantProcedure()
local seedsToRemove = difference(localPlan, remotePlan) local seedsToRemove = difference(localPlan, remotePlan)
local seedsToPlant = difference(remotePlan, localPlan) local seedsToPlant = difference(remotePlan, localPlan)
if #seedsToRemove > 0 then
removeSeeds(seedsToRemove) removeSeeds(seedsToRemove)
end
if #seedsToPlant > 0 then
retrieveSeeds(seedsToPlant) retrieveSeeds(seedsToPlant)
replantSeeds() replantSeeds()
end end
end
-- Main procedure -- Main procedure
local function main() local function main()