defrag ail on that, slight extra fixes

This commit is contained in:
Soph :3 2026-02-08 18:20:50 +02:00
parent 95fdbb73b3
commit 5bccf876fe
3 changed files with 8 additions and 5 deletions

View file

@ -50,7 +50,8 @@ local function importMechanism()
end end
end end
if #slotsToSend > 0 then 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 end
end end

View file

@ -44,6 +44,9 @@ function AIL:sync()
self.ail = abstractInventoryLib(found, true, {}) self.ail = abstractInventoryLib(found, true, {})
print("Defragging..")
self.ail.defrag()
print('Defragged.')
print("AIL synced:", #found, "inventories") print("AIL synced:", #found, "inventories")
end end
@ -138,8 +141,7 @@ function AIL:sendItemAwayMultiple(slots, perip, id, maxAmount)
allowBadTransfers = true, allowBadTransfers = true,
optimal = false optimal = false
} }
) or 0 )
self.ail.performTransfer() self.ail.performTransfer()
if moved > 0 then if moved > 0 then

View file

@ -25,13 +25,13 @@ end
function Hopper:sync() function Hopper:sync()
print("syncing hopper") print("syncing hopper")
hopper("-scan-threads 32 -storage store " .. self.patterns) hopper("-scan-threads 16 -storage store " .. self.patterns)
print("synced") print("synced")
end end
---@return fun() ---@return fun()
function Hopper:run() function Hopper:run()
return function()end return function() end
end end
---@param itemName string ---@param itemName string