better support for mass furnaces

This commit is contained in:
kepler155c@gmail.com
2019-04-23 20:21:25 -04:00
parent b3a8432f86
commit 36c75981d6

View File

@@ -100,6 +100,7 @@ local function process(list)
active = false active = false
for _, furnace in ipairs(Util.shallowCopy(furni)) do for _, furnace in ipairs(Util.shallowCopy(furni)) do
pcall(function()
local f = furnace.list() local f = furnace.list()
-- items to cook -- items to cook
@@ -111,7 +112,7 @@ local function process(list)
end end
if item and item.count > 0 then if item and item.count > 0 then
if not cooking then -- or cooking.name == item.name then if not cooking or cooking.name == item.name then
local count = cooking and cooking.count or 0 local count = cooking and cooking.count or 0
if count < 64 then if count < 64 then
print('cooking : ' .. furnace.name) print('cooking : ' .. furnace.name)
@@ -138,6 +139,7 @@ local function process(list)
list[OUTPUT_SLOT] = result list[OUTPUT_SLOT] = result
end end
end end
end)
end end
return active return active