defrag ail on that, slight extra fixes
This commit is contained in:
parent
95fdbb73b3
commit
5bccf876fe
3 changed files with 8 additions and 5 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue