cleanup + adv brewing

This commit is contained in:
kepler155c
2018-11-13 13:43:30 -05:00
parent c50de60f43
commit 986fe160c7
8 changed files with 58 additions and 40 deletions

View File

@@ -52,7 +52,6 @@ function ExportTask:cycle(context)
end
for key in pairs(entry.filter or { }) do
-- bad for perf to do listItems each time
local items = Milo:getMatches(Milo:listItems(), itemDB:splitKey(key), entry.ignoreDamage, entry.ignoreNbtHash)
for _,item in pairs(items) do
if item and item.count > 0 then
@@ -63,7 +62,9 @@ function ExportTask:cycle(context)
else
-- _debug('attempting to export %s %d', item.name, item.count)
-- TODO: always going to try and export even if the chest is full
context.storage:export(machine.name, nil, item.count, item)
if context.storage:export(machine.name, nil, item.count, item) == 0 then
break
end
end
end
end