mirror of
https://github.com/minetest-mods/i3.git
synced 2024-11-15 23:30:22 +01:00
Fix bug
This commit is contained in:
parent
4cbd8bc44a
commit
04ea2e6877
29
init.lua
29
init.lua
|
@ -2023,7 +2023,19 @@ local function common_fields(player, data, fields)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local sb_rcp, sb_usg = fields.scrbar_rcp, fields.scrbar_usg
|
local sb_rcp, sb_usg = fields.scrbar_rcp, fields.scrbar_usg
|
||||||
|
|
||||||
if fields.fav then
|
if fields.prev_recipe or fields.next_recipe then
|
||||||
|
local num = data.rnum + (fields.prev_recipe and -1 or 1)
|
||||||
|
data.rnum = data.recipes[num] and num or (fields.prev_recipe and #data.recipes or 1)
|
||||||
|
data.export_rcp = nil
|
||||||
|
data.scrbar_rcp = 1
|
||||||
|
|
||||||
|
elseif fields.prev_usage or fields.next_usage then
|
||||||
|
local num = data.unum + (fields.prev_usage and -1 or 1)
|
||||||
|
data.unum = data.usages[num] and num or (fields.prev_usage and #data.usages or 1)
|
||||||
|
data.export_usg = nil
|
||||||
|
data.scrbar_usg = 1
|
||||||
|
|
||||||
|
elseif fields.fav then
|
||||||
local fav, i = is_fav(data.favs, data.query_item)
|
local fav, i = is_fav(data.favs, data.query_item)
|
||||||
local total = #data.favs
|
local total = #data.favs
|
||||||
|
|
||||||
|
@ -2122,7 +2134,8 @@ i3.new_tab {
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
max_val = max_val + (award_list_nb * (12.9 + ((__3darmor or __skinsdb) and 0.25 or 0)))
|
max_val = max_val +
|
||||||
|
(award_list_nb * (12.9 + ((__3darmor or __skinsdb) and 0.25 or 0)))
|
||||||
end
|
end
|
||||||
|
|
||||||
fs(fmt([[
|
fs(fmt([[
|
||||||
|
@ -2250,18 +2263,6 @@ i3.new_tab {
|
||||||
if fields.cancel then
|
if fields.cancel then
|
||||||
reset_data(data)
|
reset_data(data)
|
||||||
|
|
||||||
elseif fields.prev_recipe or fields.next_recipe then
|
|
||||||
local num = data.rnum + (fields.prev_recipe and -1 or 1)
|
|
||||||
data.rnum = data.recipes[num] and num or (fields.prev_recipe and #data.recipes or 1)
|
|
||||||
data.export_rcp = nil
|
|
||||||
data.scrbar_rcp = 1
|
|
||||||
|
|
||||||
elseif fields.prev_usage or fields.next_usage then
|
|
||||||
local num = data.unum + (fields.prev_usage and -1 or 1)
|
|
||||||
data.unum = data.usages[num] and num or (fields.prev_usage and #data.usages or 1)
|
|
||||||
data.export_usg = nil
|
|
||||||
data.scrbar_usg = 1
|
|
||||||
|
|
||||||
elseif fields.key_enter_field == "filter" or fields.search then
|
elseif fields.key_enter_field == "filter" or fields.search then
|
||||||
if fields.filter == "" then
|
if fields.filter == "" then
|
||||||
reset_data(data)
|
reset_data(data)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user