This commit is contained in:
Jean-Patrick Guerrero 2022-09-25 16:55:24 +02:00
parent 325d6f30be
commit 4c4911eb4f
2 changed files with 11 additions and 7 deletions

View File

@ -294,13 +294,13 @@ local function select_item(player, data, fields)
if item == data.query_item then return end if item == data.query_item then return end
local recipes, usages = get_recipes(player, item) local recipes, usages = get_recipes(player, item)
data.query_item = item data.query_item = item
data.recipes = recipes data.recipes = recipes
data.usages = usages data.usages = usages
data.rnum = 1 data.rnum = 1
data.unum = 1 data.unum = 1
data.scrbar_rcp = 1 data.scrbar_rcp = 1
data.scrbar_usg = 1 data.scrbar_usg = 1
data.crafting_rcp = nil data.crafting_rcp = nil
data.crafting_usg = nil data.crafting_usg = nil
end end

View File

@ -1491,6 +1491,10 @@ local function get_items_fs(fs, data, player, full_height)
data.pagemax = max(1, ceil(#items / ipp)) data.pagemax = max(1, ceil(#items / ipp))
if data.pagenum > data.pagemax then
data.pagenum = data.pagemax
end
if #items == 0 then if #items == 0 then
local lbl = ES"No item to show" local lbl = ES"No item to show"
local icon, width, offset = PNG.no_result, 4, 2 local icon, width, offset = PNG.no_result, 4, 2