fix(inferium-harvester): bug on harvest procedure
This commit is contained in:
parent
467a1c9168
commit
9770321c20
@ -5,7 +5,7 @@ local config = {
|
|||||||
|
|
||||||
local MIN_FUEL_NEEDED = (10 + config.firstCropZ + config.length) * 2
|
local MIN_FUEL_NEEDED = (10 + config.firstCropZ + config.length) * 2
|
||||||
|
|
||||||
local VERSION = "0.1.3"
|
local VERSION = "0.1.4"
|
||||||
local IDLE_TIME = 2
|
local IDLE_TIME = 2
|
||||||
|
|
||||||
local turtleUtils = require('libs/turtle-utils')
|
local turtleUtils = require('libs/turtle-utils')
|
||||||
@ -112,7 +112,7 @@ local function goToHarvestPoint()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function goBackToHome()
|
local function goBackToHome()
|
||||||
for i=1, config.firstCropZ - 1, 1 do
|
for i=1, config.firstCropZ, 1 do
|
||||||
turtle.forward()
|
turtle.forward()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -143,17 +143,23 @@ end
|
|||||||
local function harvestProcedure()
|
local function harvestProcedure()
|
||||||
for i=1, config.length, 1 do
|
for i=1, config.length, 1 do
|
||||||
harvestDown()
|
harvestDown()
|
||||||
|
|
||||||
|
if i ~= config.length then
|
||||||
forward()
|
forward()
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
turtle.turnLeft()
|
turtle.turnLeft()
|
||||||
turtle.turnLeft()
|
turtle.turnLeft()
|
||||||
|
|
||||||
for i=1, config.length, 1 do
|
for i=1, config.length, 1 do
|
||||||
harvestDown()
|
harvestDown()
|
||||||
|
|
||||||
|
if i ~= config.length then
|
||||||
forward()
|
forward()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
-- Main procedure
|
-- Main procedure
|
||||||
local function main()
|
local function main()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user