diff --git a/mods/klots_player/player_inv.lua b/mods/klots_player/player_inv.lua index fe57dd9..ff8221b 100644 --- a/mods/klots_player/player_inv.lua +++ b/mods/klots_player/player_inv.lua @@ -5,6 +5,8 @@ local math_ceil, string_find, string_lower, string_sub, table_sort = math.ceil, string.find, string.lower, string.sub, table.sort -- LUALOCALS > --------------------------------------------------------- +local modname = minetest.get_current_modname() + local function invform() return "" end if klots.editmode then @@ -68,10 +70,11 @@ if klots.editmode then end minetest.register_on_player_receive_fields(function(player, formname, fields) - if formname == "" and fields.search and not (fields.scroll + if (formname == "" or formname == modname) + and fields.search and not (fields.scroll and string_sub(fields.scroll, 1, 4) == "CHG:") then return minetest.show_formspec(player:get_player_name(), - "", invform(fields.search)) + modname, invform(fields.search)) end end) end