mirror of
https://github.com/minetest-mods/i3.git
synced 2024-12-26 19:00:39 +01:00
Fix
This commit is contained in:
parent
b24411b189
commit
c7987a6c72
14
init.lua
14
init.lua
@ -631,11 +631,11 @@ end
|
||||
|
||||
local function sort_by_category(data)
|
||||
reset_compression(data)
|
||||
local items = copy(data.items_raw)
|
||||
local items = data.items_raw
|
||||
|
||||
if data.filter ~= "" then
|
||||
search(data)
|
||||
items = copy(data.items)
|
||||
items = data.items
|
||||
end
|
||||
|
||||
local new = {}
|
||||
@ -2301,6 +2301,10 @@ local function reset_data(data)
|
||||
data.export_usg = nil
|
||||
data.alt_items = nil
|
||||
data.items = data.items_raw
|
||||
|
||||
if data.current_itab > 1 then
|
||||
sort_by_category(data)
|
||||
end
|
||||
end
|
||||
|
||||
local function rcp_fields(player, data, fields)
|
||||
@ -2327,6 +2331,10 @@ local function rcp_fields(player, data, fields)
|
||||
|
||||
search(data)
|
||||
|
||||
if data.current_itab > 1 then
|
||||
sort_by_category(data)
|
||||
end
|
||||
|
||||
elseif fields.prev_page or fields.next_page then
|
||||
if data.pagemax == 1 then return end
|
||||
data.pagenum = data.pagenum - (fields.prev_page and 1 or -1)
|
||||
@ -3275,6 +3283,8 @@ if progressive_mode then
|
||||
end
|
||||
|
||||
data.items_raw = items
|
||||
data.current_itab = 1
|
||||
|
||||
search(data)
|
||||
set_fs(player)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user