mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-14 06:20:41 +01:00
🐈
This commit is contained in:
parent
29994e917b
commit
c3e092cedb
|
@ -145,15 +145,10 @@ local function sort_inventory(inv)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.sort(typekeys)
|
table.sort(typekeys)
|
||||||
if #typekeys > #inlist then return end
|
inv:set_list("main", {})
|
||||||
local empty_list = {}
|
for _, k in ipairs(typekeys) do
|
||||||
for i = 1, #inlist do
|
for _, item in ipairs(typecnt[k]) do
|
||||||
empty_list[i] = ItemStack(nil)
|
inv:add_item("main", item)
|
||||||
end
|
|
||||||
inv:set_list("main", empty_list)
|
|
||||||
for i = 1, #typekeys do
|
|
||||||
for k = 1, #typecnt[typekeys[i]] do
|
|
||||||
inv:add_item("main", typecnt[typekeys[i]][k])
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user