Fix collate_stacks
This commit is contained in:
parent
b588060d3b
commit
b665eff7fb
2
lib.lua
2
lib.lua
@ -185,7 +185,7 @@ end
|
|||||||
-- Functions like "collate" but on itemstacks (adds their counts)
|
-- Functions like "collate" but on itemstacks (adds their counts)
|
||||||
local function collate_stacks(s)
|
local function collate_stacks(s)
|
||||||
local out = {}
|
local out = {}
|
||||||
for _, stack in pairs(matching_items) do
|
for _, stack in pairs(s) do
|
||||||
local i = w.get_internal_identifier(stack)
|
local i = w.get_internal_identifier(stack)
|
||||||
if out[i] then out[i].count = out[i].count + stack.count
|
if out[i] then out[i].count = out[i].count + stack.count
|
||||||
else out[i] = stack end
|
else out[i] = stack end
|
||||||
|
Loading…
Reference in New Issue
Block a user