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
|
||||||
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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue