mirror of
https://github.com/ComfyFactory/ComfyFactorio.git
synced 2025-01-08 00:39:30 +02:00
autostash - fix
This commit is contained in:
parent
3bb771a455
commit
56a968c934
@ -406,13 +406,17 @@ local function switch_key_val(tbl)
|
|||||||
for name, count in pairs(tbl) do
|
for name, count in pairs(tbl) do
|
||||||
if priority[name] then
|
if priority[name] then
|
||||||
t[#t + 1] = {name = name, count = count, priority = priority[name]}
|
t[#t + 1] = {name = name, count = count, priority = priority[name]}
|
||||||
|
else
|
||||||
|
t[#t + 1] = {name = name, count = count}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
table.sort(
|
table.sort(
|
||||||
t,
|
t,
|
||||||
function(a, b)
|
function(a, b)
|
||||||
return a.priority > b.priority
|
if a.priority and b.priority then
|
||||||
|
return a.priority > b.priority
|
||||||
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user