From b53f1432b8f65937706e4799f7d79b5ad9e0bceb Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 2 Jun 2017 23:05:55 +0200 Subject: [PATCH] Creative: Reset search field when clicking on icon --- mods/HUD/mcl_inventory/creative.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mods/HUD/mcl_inventory/creative.lua b/mods/HUD/mcl_inventory/creative.lua index 665f1d343..76204b209 100644 --- a/mods/HUD/mcl_inventory/creative.lua +++ b/mods/HUD/mcl_inventory/creative.lua @@ -399,7 +399,6 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) set_inv_page("misc",player) page = "misc" elseif fields.nix then - if players[name].page == "all" then return end set_inv_page("all",player) page = "nix" elseif fields.food then @@ -473,8 +472,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) end players[name].start_i = start_i - local filter - if fields.suche ~= nil and fields.suche ~= "" then + local filter = "" + if not fields.nix and fields.suche ~= nil and fields.suche ~= "" then filter = fields.suche players[name].filter = filter end