feat: add harvesting config file
This commit is contained in:
parent
70854f7a75
commit
b1cbacc920
5
config/harvesting.lua
Normal file
5
config/harvesting.lua
Normal file
@ -0,0 +1,5 @@
|
||||
return {
|
||||
length = 8,
|
||||
firstCropZ = 2,
|
||||
energySaving = false
|
||||
}
|
||||
@ -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()
|
||||
|
||||
@ -12,7 +12,8 @@ local LIST_LIBS_FILES = {
|
||||
|
||||
local LIST_CONFIG_FILES = {
|
||||
'startup.lua',
|
||||
'config/mining.lua'
|
||||
'config/mining.lua',
|
||||
'config/harvesting.lua'
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user