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 1aa30142f..29df46978 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 zcmd^?dsI^e9LIlSye1+E2!--06iOv@i`)SGw{eu86XRA3F;wB$OkZG z;5liOB{;Eoh=2&ktji`y@^ZpNhm-Np!FUbVxolSkLiI<-PImvjzvt)o{rz^AvBld> zbAiDE0MPVscijqrX93`?)s+EY@uK7B0YEu?gVzQCR;Gp|NCf~)Lfp4{0nkDG!Vcc7eGHYufk_N04N1}y19b%XeLq(0BTeZuT5$^JVAAt+OF~LuK_e4 zdAM%aexSXNYZdJ$SVC{~Jhc0MD8Z<3$7zcQqT`nOl<$~f5%_J_n4e!Kh^?<=oTq&8 z7T));sg;B;@aci{(6m#<$_B=3Okc#P!hiDVnruUmNtH!}yuYpY4pUZ%8o@^@+e z06TG{h z!icBVAd*Un-f1^HUiqj;axe8)%g>@~Izo@B(9@eqwt;(z#YSZK|rIR?GY5pA{08}Tx#{ENn$l9Ivvjkdip9fuSWeeQ>>_%b{su@ zo=(sxWlf7@-MrFPf~QuEwzzQV`kr!JPKXTW?g|FuX48j*E0UsX9%CKE4k?3Kp3g!c zSnA^EED_VfT_%_W$suE{#9lCz!Qgp0Le}MarI&9Mo5Uj2DY?`Nyk&N^rxRWchdC`H z;bx+gYY|P$@}og^Z1oUugyDROz%=(Aj%JyeehGetV#qZ07mvzuIXtR4xR1u0&pFQ8 zvvbt&vL#gRXhG{}N`ESF-j~60252sfE7l4&N_hvhjXKkucpuM#Hu$X^CzgATeVk&z zMJKO3pN{KfV_?M(D$m?iw3v>47YsoiE3?&t1fH!0(Y;p+7@avr51(EVmE&SgqMCE8 z77iJ45hO@p`rvl+-tNMMG9k&ME0*}_2}95hXZBO8hnhLUo`VB?n-WGtB;S)=$^O1& zo#?0M8?C@Bp~oNTj~3i6XyyFI{>Ey`qD5}8_R2ik@lI5lu>y7C`*>X(-Iz7Y{;#Hl zl^bcdhN3ooh7_cUg5{kMPLBt3!GpP$6sR=khDH|&@Sz0TK9h#=gilg_My97AcultnR9ZZY*s zIe+Z`)r^Gfq&qLDemXMA8c!4Ci$@<134#Q^5IAh)ZEPIHf;)-}_&U^D*Po}xwImJO zOfbr2r%!_;KaS|>d-$V80);O-j>wIv6;ETd*bf_oSAFz1KCZA6^*TEFH|2&>?Au(r zRz`5d3gxpCeKK=U6vQ0O-Yl<8@8PTtnjfDA6e5k)z1 zL}De7W^!8^kiKV~q9B0>bX|<3P@IgM8%oE*1isMqzQn44f2x(i=;(IN&R2(`+U{g- z^2pNqOwY~e|F1XVsWF(;zhPZzhqC$aEOWt-9t&5-{HvVHEt*}k4@gLMH>ST{Q-?Oa&rIx literal 0 HcmV?d00001 diff --git a/mods/HUD/craftingpack/crafting/textures/fnt_inv.png b/mods/HUD/craftingpack/crafting/textures/fnt_inv.png deleted file mode 100644 index 8012ea8ed9f4f60100fdfc3dbc2c846de28f0e3f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 895 zcmbV{ZEQ<>9LIkQW2{#~;;EE~i->D7F?QJr#*AEBF1F0>+Rd_xr?ofJ%^unc(T0SI zhmC7`UM$T?ZcQh%PHc8$B_yMVRa;xt)YED2S=U^r?O9LvKa+V$yz%0j&*#-A`JTz$ zm6e<{Hwgfev$tpd2{29%0BMsa0RY{kBLQHFa(h7qz;BDkHtx6ys{}|`ot?R9&+*1! z-=>T67EPb<0QE{oGD#vd_%6p!>l5de&+{{!EX0C!08UK$5|BRm( z8L1J5dpM3`&U2Ar(h*XGW8wD&A5;dPvc(ail*MJ*4d;H~&tCc#isk=!Wqg(5bH`(4 zaiK2Z^Yw2@@RHtE+h`b>@sM=Xk34J+ZfTa~(O0C{{WngO$LW2_MK_}OS;KMVM}4 z6g`-_%c?23kza$tHThhjSF%%Y^UIB>w7@&f96Aswb<~ggSrc2w^Bo`Ef^oJe@pPY6 zTPrkC4R$ubgz9DS+WqUqGvyv37&BzZ(ka417HWc_Gd^YR)uZut8sqB%8}KfnJk~}o z)!DWgC_nGOT;_f@n_gdotetZDg>m3NK3RXN`$z|wqs28xq}HI2fzVHHQs5CFF~lU+C){gg5_#?0=(L*{?*9IITH=X>IU*RbDdDZe qX)F2k4hEM?0o3m%!t