From 68a0dd500e8cd640fb902ff5735c250d37aaddf8 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 9 Jan 2017 13:54:02 +0100 Subject: [PATCH] Creative: Rename mese to redstone --- mods/craftingpack/crafting/creative.lua | 23 +++++++++--------- ...ese.png => crafting_creative_redstone.png} | Bin .../crafting/textures/fnt_mese.png | Bin 459 -> 0 bytes .../crafting/textures/fnt_redstone.png | Bin 0 -> 425 bytes 4 files changed, 12 insertions(+), 11 deletions(-) rename mods/craftingpack/crafting/textures/{crafting_creative_mese.png => crafting_creative_redstone.png} (100%) delete mode 100644 mods/craftingpack/crafting/textures/fnt_mese.png create mode 100644 mods/craftingpack/crafting/textures/fnt_redstone.png diff --git a/mods/craftingpack/crafting/creative.lua b/mods/craftingpack/crafting/creative.lua index 26b96b5fa0..8f2a6e2831 100644 --- a/mods/craftingpack/crafting/creative.lua +++ b/mods/craftingpack/crafting/creative.lua @@ -49,8 +49,8 @@ function set_inv(filter, player) if def.walkable == false or def.drawtype == "plantlike" or def.drawtype == "allfaces_optional" then--def.groups. == true then table.insert(creative_list, name) end - elseif filter == "#mese" then - if string.find(string.lower(def.name), "mese") or string.find(string.lower(def.description), "mese") then + elseif filter == "#redstone" then + if string.find(string.lower(def.name), "redstone") or string.find(string.lower(def.description), "redstone") then table.insert(creative_list, name) end elseif filter == "#rail" then @@ -58,7 +58,7 @@ function set_inv(filter, player) table.insert(creative_list, name) end elseif filter == "#misc" then - if def.drawtype == nil and def.tool_capabilities == nil and not string.find(string.lower(def.description), "ingot") and not string.find(string.lower(def.description), "lump") and not string.find(string.lower(def.description), "dye") and not string.find(string.lower(def.name), "diamond") and not string.find(string.lower(def.name), "mese") and not string.find(string.lower(def.name), "obsidian") and not string.find(string.lower(def.description), "clay") then + if def.drawtype == nil and def.tool_capabilities == nil and not string.find(string.lower(def.description), "ingot") and not string.find(string.lower(def.description), "lump") and not string.find(string.lower(def.description), "dye") and not string.find(string.lower(def.name), "diamond") and not string.find(string.lower(def.name), "redstone") and not string.find(string.lower(def.name), "obsidian") and not string.find(string.lower(def.description), "clay") then table.insert(creative_list, name) end elseif filter == "#food" then @@ -74,7 +74,7 @@ function set_inv(filter, player) table.insert(creative_list, name) end elseif filter == "#matr" then - if def.drawtype == nil and def.tool_capabilities == nil and (string.find(string.lower(def.description), "ingot") or string.find(string.lower(def.description), "lump") or string.find(string.lower(def.description), "dye") or string.find(string.lower(def.name), "diamond") or string.find(string.lower(def.name), "mese") or string.find(string.lower(def.name), "obsidian") or string.find(string.lower(def.description), "clay") or string.find(string.lower(def.description), "stick") or string.find(string.lower(def.description), "flint") or string.find(string.lower(def.description), "seed")) then + if def.drawtype == nil and def.tool_capabilities == nil and (string.find(string.lower(def.description), "ingot") or string.find(string.lower(def.description), "lump") or string.find(string.lower(def.description), "dye") or string.find(string.lower(def.name), "diamond") or string.find(string.lower(def.name), "redstone") or string.find(string.lower(def.name), "obsidian") or string.find(string.lower(def.description), "clay") or string.find(string.lower(def.description), "stick") or string.find(string.lower(def.description), "flint") or string.find(string.lower(def.description), "seed")) then table.insert(creative_list, name) end elseif filter == "all" then @@ -120,7 +120,7 @@ local hoch = {} local bg = {} offset["blocks"] = "-0.29,-0.25" offset["deco"] = "0.98,-0.25" -offset["mese"] = "2.23,-0.25" +offset["redstone"] = "2.23,-0.25" offset["rail"] = "3.495,-0.25" offset["misc"] = "4.75,-0.25" offset["nix"] = "8.99,-0.25" @@ -133,7 +133,7 @@ offset["inv"] = "8.99,8.12" hoch["blocks"] = "" hoch["deco"] = "" -hoch["mese"] = "" +hoch["redstone"] = "" hoch["rail"] = "" hoch["misc"] = "" hoch["nix"] = "" @@ -149,7 +149,7 @@ local dark_bg = "crafting_creative_bg_dark.png" local function reset_menu_item_bg() bg["blocks"] = dark_bg bg["deco"] = dark_bg - bg["mese"] = dark_bg + bg["redstone"] = dark_bg bg["rail"] = dark_bg bg["misc"] = dark_bg bg["nix"] = dark_bg @@ -188,7 +188,7 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page) "image[" .. offset[name] .. ";1.5,1.44;crafting_creative_active.png"..hoch[name].."]".. "image_button[-0.1,0;1,1;"..bg["blocks"].."^crafting_creative_build.png;build;]".. --build blocks "image_button[1.15,0;1,1;"..bg["deco"].."^crafting_creative_deko.png;deco;]".. --decoration blocks - "image_button[2.415,0;1,1;"..bg["mese"].."^crafting_creative_mese.png;mese;]".. --redstone + "image_button[2.415,0;1,1;"..bg["redstone"].."^crafting_creative_redstone.png;redstone;]".. --redstone "image_button[3.693,0;1,1;"..bg["rail"].."^crafting_creative_rail.png;rail;]".. --transportation "image_button[4.93,0;1,1;"..bg["misc"].."^crafting_creative_misc.png;misc;]".. --miscellaneous "image_button[9.19,0;1,1;"..bg["nix"].."^crafting_creative_all.png;default;]".. --search @@ -236,9 +236,9 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) set_inv("#deco",player) page = "deco" end - if fields.mese then - set_inv("#mese",player) - page = "mese" + if fields.redstone then + set_inv("#redstone",player) + page = "redstone" end if fields.rail then set_inv("#rail",player) @@ -278,6 +278,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields) local size = string.len(formspec) local marker = string.sub(formspec,size-2) marker = string.sub(marker,1) + local start_i if marker ~= nil and marker == "p" then local page = string.sub(formspec,size-1) --minetest.chat_send_all(page) diff --git a/mods/craftingpack/crafting/textures/crafting_creative_mese.png b/mods/craftingpack/crafting/textures/crafting_creative_redstone.png similarity index 100% rename from mods/craftingpack/crafting/textures/crafting_creative_mese.png rename to mods/craftingpack/crafting/textures/crafting_creative_redstone.png diff --git a/mods/craftingpack/crafting/textures/fnt_mese.png b/mods/craftingpack/crafting/textures/fnt_mese.png deleted file mode 100644 index 4a55508cd048be527209307b3ea306170a5e0246..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 459 zcmeAS@N?(olHy`uVBq!ia0y~yU~C7n%{kbBOFyLEVm_!R{j?!FIO%QHC4$FF3wtz7@#tM5Oj?@s#q z`@iq61B~Yc*b5mXjyTFNuoVihHzdZqbD#eA>Um|p1K$NvWFCHK{q*Yo`eRS;>Yup( zw|ez?Z+VLYl8+Sl7@93Qm=7rMJz_AZ`7{5)t@-#s+_?3QsA;XUNzfX1f z7{0IGzvn39gSzeU_g1faxAS+U`z3b1f;PC`j%Eu6p7{TVDz4uBeHl|mzW?yW=i%`R t`+rx?zXvuP?q)}sBa8_hB!Y zhW|hogRy$eXCTE{;1OBOz@VoL!i*J5?aP3I>?NMQuIvvPIeAR