From e70ef935d44a89a03a2e4fb27b68130be800948f Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Tue, 24 Jan 2017 21:58:11 +0100 Subject: [PATCH] Much more efficient creative search tab --- mods/craftingpack/crafting/creative.lua | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/mods/craftingpack/crafting/creative.lua b/mods/craftingpack/crafting/creative.lua index c4f750a9b9..709ca3f4b4 100644 --- a/mods/craftingpack/crafting/creative.lua +++ b/mods/craftingpack/crafting/creative.lua @@ -303,13 +303,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) return end - if fields.bgcolor then - minetest.chat_send_all("jupp") - end local name = player:get_player_name() - if not name or name == "" then - minetest.log("error", "NONAME") - end + if fields.blocks then set_inv("\0blocks",player) page = "blocks" @@ -345,10 +340,10 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) page = "matr" elseif fields.inv then page = "inv" - elseif fields.suche == "" then + elseif fields.suche == "" and not fields.creative_next and not fields.creative_prev then set_inv("\0all", player) page = "nix" - elseif fields.suche ~= nil then + elseif fields.suche ~= nil and not fields.creative_next and not fields.creative_prev then set_inv(string.lower(fields.suche),player) page = "nix" end