1
0
mirror of https://github.com/ComfyFactory/ComfyFactorio.git synced 2025-01-06 00:23:49 +02:00

autostash - fix

This commit is contained in:
Gerkiz 2021-03-21 01:57:02 +01:00
parent 3bb771a455
commit 56a968c934

View File

@ -406,13 +406,17 @@ local function switch_key_val(tbl)
for name, count in pairs(tbl) do
if priority[name] then
t[#t + 1] = {name = name, count = count, priority = priority[name]}
else
t[#t + 1] = {name = name, count = count}
end
end
table.sort(
t,
function(a, b)
return a.priority > b.priority
if a.priority and b.priority then
return a.priority > b.priority
end
end
)