milo wip
This commit is contained in:
@@ -9,14 +9,15 @@ function LimitTask:cycle(context)
|
||||
local trashcan = context.storage:filterActive('trashcan')()
|
||||
|
||||
if trashcan then
|
||||
for _,res in pairs(context.resources) do
|
||||
for k,res in pairs(context.resources) do
|
||||
if res.limit then
|
||||
local item = Milo:getItemWithQty(res, res.ignoreDamage, res.ignoreNbtHash)
|
||||
if item and item.count > res.limit then
|
||||
-- TODO: change to export method of finding items (maybe)
|
||||
local item, count = Milo:getItemWithQty(Milo:splitKey(k), res.ignoreDamage, res.ignoreNbtHash)
|
||||
if item and count > res.limit then
|
||||
context.storage:export(
|
||||
trashcan.name,
|
||||
nil,
|
||||
item.count - res.limit,
|
||||
count - res.limit,
|
||||
item)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user