From 40f468f18fecb1c5fad47cc77ad6161c4f900dda Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 2 Feb 2018 02:07:09 +0100 Subject: [PATCH] Add non-functional anvil formspec --- mods/ITEMS/mcl_anvils/depends.txt | 1 + mods/ITEMS/mcl_anvils/init.lua | 22 ++++++++++++++++++ .../textures/mcl_anvils_inventory.png | Bin 0 -> 1920 bytes 3 files changed, 23 insertions(+) create mode 100644 mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png diff --git a/mods/ITEMS/mcl_anvils/depends.txt b/mods/ITEMS/mcl_anvils/depends.txt index 38406b910..2e7132599 100644 --- a/mods/ITEMS/mcl_anvils/depends.txt +++ b/mods/ITEMS/mcl_anvils/depends.txt @@ -1,3 +1,4 @@ +mcl_init mcl_sounds mcl_core mcl_hunger diff --git a/mods/ITEMS/mcl_anvils/init.lua b/mods/ITEMS/mcl_anvils/init.lua index d3f3fa1f0..cd5cda5ff 100644 --- a/mods/ITEMS/mcl_anvils/init.lua +++ b/mods/ITEMS/mcl_anvils/init.lua @@ -17,6 +17,28 @@ local anvildef = { sounds = mcl_sounds.node_sound_metal_defaults(), _mcl_blast_resistance = 6000, _mcl_hardness = 5, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + local inv = meta:get_inventory() + inv:set_size("input1", 1) + inv:set_size("input2", 1) + inv:set_size("output", 1) + local form = "size[9,8.75]".. + "background[-0.19,-0.25;9.41,9.49;mcl_anvils_inventory.png]".. + mcl_vars.inventory_header.. + "list[current_player;main;0,4.5;9,3;9]".. + "list[current_player;main;0,7.74;9,1;]".. + "list[context;input1;1,2.5;1,1;]".. + "list[current_name;input2;4,2.5;1,1;]".. + "list[current_name;output;8,2.5;1,1;]".. + "listring[current_name;output]".. + "listring[current_player;main]".. + "listring[current_name;input1]".. + "listring[current_player;main]".. + "listring[current_name;input2]".. + "listring[current_player;main]" + meta:set_string("formspec", form) + end, } if minetest.get_modpath("screwdriver") then anvildef.on_rotate = screwdriver.rotate_simple diff --git a/mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png b/mods/ITEMS/mcl_anvils/textures/mcl_anvils_inventory.png new file mode 100644 index 0000000000000000000000000000000000000000..24bc392f64e32e233ccb557c110bbdabb4a2cce3 GIT binary patch literal 1920 zcmcgteN0nV6o01MoG1!BOvKcW8T3KWDFo*2K0x^pt8hhO1{Fon7>k2(Ta*=@4yUq* z5|cfg$Sy-5?gdOx6gLp@10UUr;4n4nq|)&y2q-eK3Qff>_f?0mWXZB@{paO(PR{R~ z-|w88vQaSH*=ed1MN!VmrJ<`RN(L!P=JJM&qA1bHD}bV?=}{3eVU+Z<+wING%@&Jg z>(;F*l`1?uyriV0prBw4n&e4Q)R?qYFq&G_d1nhnjdf9mE{^$Z%)@&tQw$5_m)lbJ zsb%Ns4(+NTpzcX`1$r0?}=qQvhN?Uy*-ei zAVtx}@#d)mt_clgpNAT2QptRLlj7swljoDZq9+sua3Tf)!6+Mv?#JKj%3WbjtD*TFUeFifyG5WLprkC(y^QAPX7m1tnrpD9t3xd)9$L^{3{*xlG@-R8i2|9${dO zo5H}r9~)V&@MN37a)matpx2B8sNX1u7--AaZNfnN$cusB9c*GbQ_E$R=GPqqNHh<$ zB2nnBI@Ki!eVV_pLnz%tj0cV_z3w=2li;TMzstUU5u!h@S$;J_6L>O2qTK(qQ&1fT zEX^xA`X9`ekK0st^26O1{jxxS^biu(Z`%<6d|D1bJ#q$#m8;ug@=`^MC|zcC59)n@ z8~U>Ai493Z@@pp+cXQ!!Gw8mnt^Fy*($PoXcM3v1E({WH2E7^`d=!)BKe+v^OM4i| zn|kk6qy^1VJodpm1S)8Cb5DVkGKI9w)0n>Y1c2j&sC(B^H3(G@^MCsjHsjh$Rx1 z-P1L08qu>;Vt?5&arT_@9L2fqXBO7>rQky})4mx44+gGCTuC3aeSrGI&Y1#66AAeG zKkZE(bf=)tl58^`{%HRxK z>`f`YYh`b`^Js4zJ`B5=ruz@yS(V?&Lx^O~0ZkV*bY Nm0>WnJb2^YKLF4uhu#1H literal 0 HcmV?d00001