feat(inferium-harvester): add energySavingMode

This commit is contained in:
Guillaume ARM 2024-05-19 18:35:01 +02:00
parent 9770321c20
commit 66e9eff8ac

View File

@ -1,11 +1,12 @@
local config = { local config = {
length = 8, length = 8,
firstCropZ = 2 firstCropZ = 2,
energySaving = false
} }
local MIN_FUEL_NEEDED = (10 + config.firstCropZ + config.length) * 2 local MIN_FUEL_NEEDED = (10 + config.firstCropZ + config.length) * 2
local VERSION = "0.1.4" local VERSION = "0.2.0"
local IDLE_TIME = 2 local IDLE_TIME = 2
local turtleUtils = require('libs/turtle-utils') local turtleUtils = require('libs/turtle-utils')
@ -153,7 +154,9 @@ local function harvestProcedure()
turtle.turnLeft() turtle.turnLeft()
for i=1, config.length, 1 do for i=1, config.length, 1 do
harvestDown() if config.energySaving then
harvestDown()
end
if i ~= config.length then if i ~= config.length then
forward() forward()