From 2c16c4db690b9a85c94978d5c528536b95243630 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 9 Mar 2017 06:55:03 +0100 Subject: [PATCH] Add armor slots in creative inventory (WIP) --- mods/HUD/craftingpack/crafting/creative.lua | 21 +++++++++++++++--- .../crafting_inventory_creative_survival.png | Bin 0 -> 3804 bytes .../crafting/textures/fnt_inv.png | Bin 895 -> 0 bytes 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 mods/HUD/craftingpack/crafting/textures/crafting_inventory_creative_survival.png delete mode 100644 mods/HUD/craftingpack/crafting/textures/fnt_inv.png diff --git a/mods/HUD/craftingpack/crafting/creative.lua b/mods/HUD/craftingpack/crafting/creative.lua index 1aa30142f7..29df46978c 100644 --- a/mods/HUD/craftingpack/crafting/creative.lua +++ b/mods/HUD/craftingpack/crafting/creative.lua @@ -209,15 +209,26 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page, bg[name] = "crafting_creative_bg.png" local inv_bg = "crafting_inventory_creative.png" if name == "inv" then + inv_bg = "crafting_inventory_creative_survival.png" -- Survival inventory slots - main_list = "image[-0.2,1.7;11.35,2.33;crafting_creative_bg.png]".. - "list[current_player;main;0,3.75;9,3;9]".. + main_list = "list[current_player;main;0,3.75;9,3;9]".. + -- armor + "list[detached:"..playername.."_armor;armor;2.5,1.3;1,1;1]".. + "list[detached:"..playername.."_armor;armor;2.5,2.75;1,1;2]".. + "list[detached:"..playername.."_armor;armor;5.5,1.3;1,1;3]".. + "list[detached:"..playername.."_armor;armor;5.5,2.75;1,1;4]".. + --TODO: armor_slot_imgs.. -- crafting guide button "image_button[9,1;1,1;craftguide_book.png;__mcl_craftguide;]".. "tooltip[__mcl_craftguide;Show crafting recipes]".. -- achievements button "image_button[9,2;1,1;mcl_achievements_button.png;__mcl_achievements;]".. "tooltip[__mcl_achievements;Achievements]" + + -- For shortcuts + listrings = listrings .. + "listring[detached:"..playername.."_armor;armor]".. + "listring[current_player;main]" else inv_bg = inv_bg .. "^crafting_inventory_creative_scroll.png" -- Creative inventory slots @@ -237,6 +248,10 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page, return "image[" .. offset[check] .. ";1.5,1.44;" .. img .. hoch[check].. "]" .. "image[" .. boffset[check] .. ";1,1;crafting_creative_marker.png]" end + local fnt = "" + if name ~= "inv" then + fnt = "image[0,1;5,0.75;fnt_"..name..".png]" + end formspec = "size[10,9.3]".. mcl_vars.inventory_header.. "background[-0.19,-0.25;10.5,9.87;"..inv_bg.."]".. @@ -259,7 +274,7 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page, "item_image_button[9.19,0;1,1;mcl_compass:compass;nix;]".. --search tab(name, "nix") .. "tooltip[nix;Search Items]".. - "image[0,1;5,0.75;fnt_"..name..".png]".. + fnt.. "list[current_player;main;0,7;9,1;]".. main_list.. "item_image_button[-0.1,8.37;1,1;mcl_core:apple;food;]".. --foodstuff diff --git a/mods/HUD/craftingpack/crafting/textures/crafting_inventory_creative_survival.png b/mods/HUD/craftingpack/crafting/textures/crafting_inventory_creative_survival.png new file mode 100644 index 0000000000000000000000000000000000000000..c17a107214459e3eec99abf78b442ab19e54dd26 GIT binary patch literal 3804 zcmds4c~BE~6#j)E5D}@M(4um*cuXylKm`E6~nnK$>?Ie5^ft@T+8KuMOqJY*I;w+!>z7y#!y08HcZEB)5M3tFKRPY<9tnuXNBGu;GlpY^%|JV9rX z?)K5H?_knL-X3eW>}%`glVSoy3mA=*gFEks6U+;@p0bG~x@@dZ`;iq9iQjycb>JF7 zYIiyF9QCVr@H-A$k>o;=UpF`uo^i5R+stC6)r(jinBfh4b&lUdkkmD#cQ zMGs3+JpPxWpr4y8YuTUdR&6`rkV+ok&To)QhGiqY3k=g5_CL?%%bo{4v$>y4K2a@v z5F66eBQFZv8++jJs^JkH&%q*#EtI7C)87Z>v)vjBM;sJwNE9vI*dLT<^CUf~rI_%U>jo2K6vF`|of@;vacH#aQMdeV`X9Dm#?-cle+_fnNcoikbjC8Nef+*g z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