diff --git a/inferium-harvester.lua b/inferium-harvester.lua index 9d2fe6f..ab1c0a2 100644 --- a/inferium-harvester.lua +++ b/inferium-harvester.lua @@ -3,7 +3,7 @@ local utils = require('libs/utils') local inferium = require('libs/inferium') local turtleUtils = require('libs/turtle-utils') -local VERSION = "4.1.0" +local VERSION = "4.1.1" local IDLE_TIME = 2 local WAIT_ITEM_IDLE_TIME = 5 local NETWORK_TIMEOUT = 4 @@ -440,20 +440,20 @@ local function retrieveFertilizedEssences(_) local slot = getItemSlot(storageInventory, inferium.FERTILIZED_ESSENCE) if slot then - local inventoryCount = getCountItem(storageInventory, inferium.FERTILIZED_ESSENCE) + local inventoryCount = getCountItem(storageInventory, inferium.FERTILIZED_ESSENCE) or 0 local realCount = math.min(MAX_FERTILIZED_ESSENCE, inventoryCount) print('> retrieve ' .. tostring(realCount) .. ' fertilized essences from storage') local pushOk = storageInventory.pushItems(peripheral.getName(bufferInventory), slot, realCount) if not pushOk then - error('retrieveFertilizedEssences error: cannot pushItems from storage to buffer') + return false end local suckOk = turtle.suck() if not suckOk then - error('retrieveFertilizedEssences error: cannot suck items from buffer') + return false end return true