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 38406b91..2e713259 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 d3f3fa1f..cd5cda5f 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 zcmeAS@N?(olHy`uVBq!ia0y~yVD@8RU>0CuW?*1=#HC@%z`!6E;1lA?00#g6|G#kI z!j~^!GBPqUGc(=Y-4`!jJa_Kg$U=S<1_lPkk|4ie28U-i(ij-n1w36GLn;{G+zrgT zY#?*sVL?j~^Df~9T^@Uim|JeJD%G^cE_`48DtBQ~Tg+eX&37t4PkFE2xa#P}CVR!o z%;~6~oQDXd;7r0(}f#c$4+Q()?d=Nya9%X5mnpT3aK{r_W2%*>~Dg^!MO3ak75 zkNsFYe{9ED9eTIccY~KknzV*YSFMqEnj>O*yD}zG(iT%F{m`EM?XG=2#SN z>i5`xO*H=s^Lrr~GkH|N$ui=!5WS?!NR9v@jL*%jO)ygUso z5e1QG1xaW+7d|?&^3PTaIrYBl zC@2`R{>q$Q>iBZ9dyKsB`@{D>@P^kFP69ohm!s?&*?Jj(jf(XLLM^0K48u=j{ z4UyC?s1oX)6>;Z&=VW`ipYvy-#Wy4#{rJFvl3gTJZ1os5!VsQ1LaCobv^P$QxO1;_ za^?NI7*4g2R0sJ$Qr+(u+#e7hKvD=u@@8Vz<0F~>-tzCRzMc7{;E~Dyxeu$BSsvSQ hzw`2q*=2u^vAf)f&^_z5tr1j{db;|#taD0e0szn`hu#1H literal 0 HcmV?d00001