diff --git a/src/main.lua b/src/main.lua index bc3e9c0..a6a8722 100644 --- a/src/main.lua +++ b/src/main.lua @@ -50,7 +50,8 @@ local function importMechanism() end end if #slotsToSend > 0 then - inv:sendItemAwayMultiple(slotsToSend, perip, import_from_inv) + -- for some reason if i set perip here it takes like 9000 more decades , weird + print(inv:sendItemAwayMultiple(slotsToSend, nil, import_from_inv)) end end end diff --git a/src/modules/inventory/inv_ail.lua b/src/modules/inventory/inv_ail.lua index 8a91e74..6ddd7c5 100644 --- a/src/modules/inventory/inv_ail.lua +++ b/src/modules/inventory/inv_ail.lua @@ -44,6 +44,9 @@ function AIL:sync() self.ail = abstractInventoryLib(found, true, {}) + print("Defragging..") + self.ail.defrag() + print('Defragged.') print("AIL synced:", #found, "inventories") end @@ -138,8 +141,7 @@ function AIL:sendItemAwayMultiple(slots, perip, id, maxAmount) allowBadTransfers = true, optimal = false } - ) or 0 - + ) self.ail.performTransfer() if moved > 0 then diff --git a/src/modules/inventory/inv_hopper.lua b/src/modules/inventory/inv_hopper.lua index fe87566..0f30fa1 100644 --- a/src/modules/inventory/inv_hopper.lua +++ b/src/modules/inventory/inv_hopper.lua @@ -25,13 +25,13 @@ end function Hopper:sync() print("syncing hopper") - hopper("-scan-threads 32 -storage store " .. self.patterns) + hopper("-scan-threads 16 -storage store " .. self.patterns) print("synced") end ---@return fun() function Hopper:run() - return function()end + return function() end end ---@param itemName string