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 zcmcgt4NMbf7_R9yCkUd2WSEN1fCoXR5}4Qhfbug$ukpdd+IjlH;TEweDg;h=tX6A#d%MYGI&k2C zR4NS(4XvoCC@Cq~PR?_O@T`=rL?mx*f9HN4Z?;od@VcnaW}& zIGwxxs*Hc6^Yx{fM|YKtW(*~i$&QI9>@R8MPx42x?6b|)hXdZ0OHYMs632bRH903U z9CXS6qQ2o++Wm0KO7y0Unbm_`Sq6OgHj$Q7ra4ur*XIeaO*EsRaD@OP7hnYIPSB!Wv`lAlu3#H`ptOaPX=9mp1M;_dkqz$I+$W z%clGrUcbmno8-65YekDNg2u^U+neO(&2lfe z0fjX?s_(j1JU6C$ej~dvSY){nYkX9rLj7pjv-yv^^vadiE-%Nk2Xh}3Sl%3q6``a^ zt-WF4*!yyxY$~Mu*zbC9jeE|*&I9>)g!vwr9N0EtePqV?96h1}Hw26w_ zE_2bTUOJywTK=ySm?G{xZr6>Ux??RCCHy>S%CrOp@x`iD_gX6(&Yz_5hC+cd(%V`2 z7Dlv1&=MN=3nX(%*7@|i1NoZ`DfI&7K~G{eLEkUKn{hHOhjs2{DqV9UPY9Izxxfxv z;3x`s1p)t+E#>7uC5TD_UG~s;>K90m*`B~W6oz0n67N|bjn{o@@L!IN#)Cd;%Lt8| z#V~^ZkF5%-^jr_{UurQh>f|{%Y19fKTVAzuFT6)QG2*-9Z3;@?bsc2gSp=UF!wh9UG(JzVSSa!8*gq(_CFWIl|1^ipOK!1 zbx?}>j1N78bM`i!`ylI@PY&+KeF(9;;&;b9UzCTFLqh0Wv#lqpFo`v>+-BAdk;4z^ zmeJg1L_^$!@Yb1igH)(^v0(J3&X`!vEq&wzy8v>?36eVkrbfp