milo: smart transfer

This commit is contained in:
kepler155c@gmail.com
2018-12-01 19:08:57 -05:00
parent 0853a16b59
commit 4a844eebfe
19 changed files with 177 additions and 121 deletions

View File

@@ -16,7 +16,7 @@ function LimitTask:cycle(context)
local amount = count - res.limit
for _, item in pairs(items) do
amount = amount - context.storage:export(
trashcan.name,
trashcan,
nil,
math.min(amount, item.count),
item)