feat(inferium-harvester): add defaultRemotePlan to the static config

This commit is contained in:
Guillaume ARM 2024-05-20 21:07:17 +02:00
parent 340d5f4cff
commit 5e2234da78
2 changed files with 20 additions and 18 deletions

View File

@ -1,5 +1,22 @@
local function mystical(essenceName)
return 'mysticalagriculture:' .. essenceName .. '_seeds'
end
-- FALLBACK WHEN CANNOT FETCH THE REMOTE PLAN
local DEFAULT_REMOTE_PLAN = {
mystical('coal'),
mystical('inferium'),
mystical('inferium'),
mystical('inferium'),
mystical('inferium'),
mystical('inferium'),
mystical('inferium'),
mystical('inferium')
}
return {
length = 8,
firstCropZ = 2,
energySaving = false
}
energySaving = false,
defaultRemotePlan = DEFAULT_REMOTE_PLAN
}

View File

@ -8,21 +8,6 @@ local WAIT_ITEM_IDLE_TIME = 5
local MIN_FUEL_NEEDED = (100 + config.firstCropZ + config.length) * 2
local MIN_FREE_SLOTS_BEFORE_COMPACT = 4
local function mystical(essenceName)
return 'mysticalagriculture:' .. essenceName .. '_seeds'
end
local fakeRemotePlan = {
mystical('coal'),
mystical('diamond'),
mystical('nether_quartz'),
mystical('dye'),
mystical('inferium'),
mystical('inferium'),
mystical('inferium'),
mystical('inferium')
}
-- a table with the list of current crops
local localPlan = nil
@ -273,7 +258,7 @@ end
local function fetchRemotePlan()
-- TODO
return fakeRemotePlan
return config.defaultRemotePlan or {}
end
local function removeSeeds(seeds)