Minor cleaning
This commit is contained in:
parent
4fcf4f5790
commit
25e57f6a23
|
@ -449,13 +449,8 @@ local function sort_inventory(player, data)
|
||||||
list = compress_items(list, start_i)
|
list = compress_items(list, start_i)
|
||||||
end
|
end
|
||||||
|
|
||||||
local sorts = {}
|
local idx = get_sorting_idx(data.sort)
|
||||||
|
local new_inv = i3.sorting_methods[idx].func(list, data)
|
||||||
for _, def in ipairs(i3.sorting_methods) do
|
|
||||||
sorts[def.name] = def.func
|
|
||||||
end
|
|
||||||
|
|
||||||
local new_inv = sorts[data.sort](list, data)
|
|
||||||
|
|
||||||
if new_inv then
|
if new_inv then
|
||||||
apply_sort(inv, size, data, new_inv, start_i)
|
apply_sort(inv, size, data, new_inv, start_i)
|
||||||
|
|
Ŝarĝante…
Reference in New Issue