feat: add harvesting config file

This commit is contained in:
Guillaume ARM 2024-05-19 20:12:25 +02:00
parent 70854f7a75
commit b1cbacc920
3 changed files with 14 additions and 12 deletions

5
config/harvesting.lua Normal file
View File

@ -0,0 +1,5 @@
return {
length = 8,
firstCropZ = 2,
energySaving = false
}

View File

@ -1,15 +1,9 @@
local config = {
length = 8,
firstCropZ = 2,
energySaving = false
}
local MIN_FUEL_NEEDED = (10 + config.firstCropZ + config.length) * 2
local VERSION = "0.2.0"
local IDLE_TIME = 2
local turtleUtils = require('libs/turtle-utils')
local config = require('config/harvesting')
local VERSION = "0.3.0"
local IDLE_TIME = 2
local MIN_FUEL_NEEDED = (10 + config.firstCropZ + config.length) * 2
-- UTILS
@ -133,6 +127,8 @@ local function harvestDown()
if not turtle.placeDown() then
error('turtle cannot place crop')
end
turtleUtils.compactInventory()
end
local function forward()

View File

@ -12,7 +12,8 @@ local LIST_LIBS_FILES = {
local LIST_CONFIG_FILES = {
'startup.lua',
'config/mining.lua'
'config/mining.lua',
'config/harvesting.lua'
}