From 9fd13797a66c30f9564d2a3e193ccc9952d6e4e3 Mon Sep 17 00:00:00 2001 From: Kotolegokot Date: Mon, 15 Oct 2012 23:37:47 +0600 Subject: [PATCH] Anvil formspec --- mods/anvil/init.lua | 26 +++++++++++++------------- mods/anvil/textures/anvil_arrow.png | Bin 0 -> 708 bytes 2 files changed, 13 insertions(+), 13 deletions(-) create mode 100644 mods/anvil/textures/anvil_arrow.png diff --git a/mods/anvil/init.lua b/mods/anvil/init.lua index 705a75d..6799877 100644 --- a/mods/anvil/init.lua +++ b/mods/anvil/init.lua @@ -104,23 +104,23 @@ minetest.register_node("anvil:self", { end, on_construct = function(pos) local meta = minetest.env:get_meta(pos) - meta:set_string("formspec", "invsize[8,10;]".. - "list[current_name;hammer;1,3.5;1,1;]".. - "list[current_name;ingot;1,1.5;1,1;]".. - "list[current_name;recipe;6,1.5;1,1;]".. - "list[current_name;res;3,1.5;1,1;]".. - "label[1,1;Ingot:]".. - "label[6,1;Recipe:]".. - "label[3,1;Output:]".. - "label[1,3;Hammer:]".. - "button[4,2.5;2,3;forge;Forge]".. - "list[current_player;main;0,6;8,4;]") + meta:set_string("formspec", "invsize[8,7;]".. + "button[0.5,0.25;2,1;buttonForge;Forge]".. + "list[current_name;src1;2.9,0.25;1,1;]".. + "image[3.69,0.22;0.54,1.5;anvil_arrow.png]".. + "list[current_name;src2;4.1,0.25;1,1;]".. + "button[5.5,0.25;2,1;buttonWeld;Weld]".. + "list[current_name;hammer;1,1.5;1,1;]".. + "list[current_name;res;3.5,1.5;1,1;]".. + "list[current_name;borax;6,1.5;1,1;]".. + "list[current_player;main;0,3;8,4;]") meta:set_string("infotext", "Anvil") local inv = meta:get_inventory() + inv:set_size("src1", 1) + inv:set_size("src2", 1) inv:set_size("hammer", 1) - inv:set_size("ingot", 1) - inv:set_size("recipe", 1) inv:set_size("res", 1) + inv:set_size("borax", 1) end, on_receive_fields = function(pos, formname, fields, sender) local meta = minetest.env:get_meta(pos) diff --git a/mods/anvil/textures/anvil_arrow.png b/mods/anvil/textures/anvil_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..3522669a46bedc7db2a5d7ff948a820fe9f687b4 GIT binary patch literal 708 zcmV;#0z3VQP)gGHICks|NK67d ziZA0hPP)6gy4)G6Dz+GcjmB zYYGKh~HjqK<4wn-vdSz7Jk#$@uIe$(o2 zoM;a+Z3wXtVgl0lUZ1F1O{t~;g|WJsP_g1JsHMRQUM4}8Pu5HiV~Sq9Vq}m_}U3^Y9PbLC+rrVd=``#vU7e> zerkWjyKXq!mPNsBO$9oA>a6?u!^J?_RwBDpbE1WL<3EFwSeCCaB)xar%KEI^1iHh` z@dyq_48u{_KI6#F|0ttvt