fix(inferium-harvester): wait for bottom inventory before dropping items

This commit is contained in:
Guillaume ARM 2024-05-20 00:07:06 +02:00
parent ad14b3f521
commit e5e63f4223

View File

@ -1,7 +1,7 @@
local turtleUtils = require('libs/turtle-utils')
local config = require('config/harvesting')
local VERSION = "0.4.1"
local VERSION = "0.4.2"
local IDLE_TIME = 2
local MIN_FUEL_NEEDED = (10 + config.firstCropZ + config.length) * 2
local MIN_FREE_SLOTS_BEFORE_COMPACT = 4
@ -81,6 +81,8 @@ local function dropAllProcedure()
local count = turtle.getItemCount(i)
if count > 0 then
turtleUtils.waitForInventory('bottom', IDLE_TIME)
while not turtleUtils.dropSlot(i, turtle.dropDown) do
os.sleep(IDLE_TIME)
end