From ecefc937c9be82cb279c7beda6215b96540c41c8 Mon Sep 17 00:00:00 2001 From: Anthony Zhang Date: Thu, 27 Sep 2012 17:25:58 -0400 Subject: [PATCH] Add ghoststone, crafted like removestone, with steel ingots at the corners. Trapstone disappears upon mesecon signals, but unlike removestone, reappears after the mesecon signal turns off. --- mesecons_random/init.lua | 60 +++++++++++++++--- .../textures/jeija_ghoststone.png | Bin 0 -> 743 bytes .../textures/jeija_ghoststone_inv.png | Bin 0 -> 777 bytes 3 files changed, 52 insertions(+), 8 deletions(-) create mode 100644 mesecons_textures/textures/jeija_ghoststone.png create mode 100644 mesecons_textures/textures/jeija_ghoststone_inv.png diff --git a/mesecons_random/init.lua b/mesecons_random/init.lua index 97be973..54d13b9 100644 --- a/mesecons_random/init.lua +++ b/mesecons_random/init.lua @@ -1,26 +1,70 @@ --- REMOVE_STONE +-- REMOVESTONE minetest.register_node("mesecons_random:removestone", { tiles = {"jeija_removestone.png"}, inventory_image = minetest.inventorycube("jeija_removestone_inv.png"), - material = minetest.digprop_stonelike(1.0), - groups = {cracky=3, mesecon = 2}, + groups = {cracky=3, mesecon=2}, description="Removestone", }) mesecon:register_effector(nil, "mesecons_random:removestone") minetest.register_craft({ - output = '"mesecons_random:removestone" 4', + output = 'mesecons_random:removestone 4', recipe = { - {'', '"default:cobble"',''}, - {'"default:cobble"', '"group:mesecon_conductor_craftable"', '"default:cobble"'}, - {'', '"default:cobble"',''}, + {"", "default:cobble", ""}, + {"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"}, + {"", "default:cobble", ""}, } }) mesecon:register_on_signal_on(function(pos, node) - if node.name=="mesecons_random:removestone" then + if node.name == "mesecons_random:removestone" then minetest.env:remove_node(pos) end end) + +-- ghoststone + +minetest.register_node("mesecons_random:ghoststone", { + description="ghoststone", + tiles = {"jeija_ghoststone.png"}, + is_ground_content = true, + inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"), + groups = {cracky=3, mesecon=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("mesecons_random:ghoststone_active", { + drawtype = "airlike", + pointable = false, + walkable = false, + diggable = false, + sunlight_propagates = true, + groups = {mesecon=2}, +}) + +mesecon:register_effector("mesecons_random:ghoststone_active", "mesecons_random:ghoststone") + +minetest.register_craft({ + output = 'mesecons_random:ghoststone 4', + recipe = { + {"default:steel_ingot", "default:cobble", "default:steel_ingot"}, + {"default:cobble", "group:mesecon_conductor_craftable", "default:cobble"}, + {"default:steel_ingot", "default:cobble", "default:steel_ingot"}, + } +}) + +mesecon:register_on_signal_on(function(pos, node) + if node.name == "mesecons_random:ghoststone" then + minetest.env:add_node(pos, {name="mesecons_random:ghoststone_active"}) + nodeupdate(pos) + end +end) + +mesecon:register_on_signal_off(function(pos, node) + if node.name == "mesecons_random:ghoststone_active" then + minetest.env:add_node(pos, {name="mesecons_random:ghoststone"}) + nodeupdate(pos) + end +end) \ No newline at end of file diff --git a/mesecons_textures/textures/jeija_ghoststone.png b/mesecons_textures/textures/jeija_ghoststone.png new file mode 100644 index 0000000000000000000000000000000000000000..1917b7c00b143cb8417350f8495fead5b4c333a8 GIT binary patch literal 743 zcmV?P)Px#32;bRa{vGgP5=N469IKCxxWAa00(qQO+^RX1P=i@2nANJ-2earc}YY;R4C6S z&&iV9GynilZMG~g>cyT;&rDCxk^l*n3sn@qz=0}$pP~o^2t#kS+p88!vN-Vm;K84N z`cVowjAN3-ZP&+)0RRXg)>?$nIF2vRPs1=)bxklPL4cPFUNG@oyS-MEG!|6l_fe3y5?j>eX z)AcN(Nb6}B#O9^|-eZh~kTGLj*H6~y$&918$@8XdUk|4wj?ZNUKYsgu|8RdPt2m14 zrX9yIO_DGSuWbuFDDqX;4}@UvJwnJBiyrRpj>j{Eu)a0{!EqeNj1huo=Za#j^^~Q_ zG?|z&rS&KT&a%W9!?UdGhcFCh=d5$anly>4x_S5Z$$KD#oaZ?tL6)X?cXx{kzFex+ zdI111#-?eamG<7p3H$ul-!!CAM2)ckfTnFxk+1uHczoPNG_uY?2pNm+@3zk`k5a1b zWB+X~?q-bzPrjX@VCZr@;tzWjSo zN;Ad+LbTSeha*CWMHK$<{dbd^1~D!cTnGsvw9YMg76gG(+B%03A_Q}u384V+Xvw)y zB2AJ@SvlvP_76**O~#Buyx9~8!7vP(w)^zQpJ^H=NrIpDdlC>2yq`UU@Or(vdH(p} zoAaf_2pemqRE)9pdbQ;I)9;^g7z8nkjI~0_o4i;oIE27CC#7oIPV31Sqm+s$ohE}Z Z{tvr+aOLnPml^;7002ovPDHLkV1l->RPO)) literal 0 HcmV?d00001 diff --git a/mesecons_textures/textures/jeija_ghoststone_inv.png b/mesecons_textures/textures/jeija_ghoststone_inv.png new file mode 100644 index 0000000000000000000000000000000000000000..c715d7f764e105dee77c3d2f484dfed805014059 GIT binary patch literal 777 zcmV+k1NQuhP)Px#32;bRa{vGgP5=N469IKCxxWAa00(qQO+^RX1P=i@9`S-2i~s-vn@L1LR4C5{ z!P{=*L;wKLx!4|$FNvKvakC-a?4_t66`|dIDAEdeeg)p+!GaaxT>Z~nRI0q6l>TI1LGtWg>x`0e@}0+5Hn`{QXA zhVv+V`*8GJi~#)Z$>R|rcZ`h)L9A1UwtYUG*kN!GI>|2a{d?9(ZCb4g-aeb8+lu}9 z@GznDV{w8%u2(OXi;qQ__~f=?$F|J^N$2ZgTVIyfd|5k+X%@L3pc%F4y)Q*rVT=1NDN zd)G8}7+9w;Lcibd9Ej?!JGKJF#M?E^*NeQ8-Suj@P7|)wAN#|Bw_nb(lN3#-zL?LR zPErJ+FvfY{;wqm50QQ^%06dJY^1KxC*W3U0oTro`1WO^_?GG{W@+gEqT|O6mUvRM) zMJFK>Xi=t9U3n5xWQ7L2=1|N=vw)WNX(W7|OYE=k%F`Zxt zLf5;i*)KPnX+X2U$KRjLsq5Ndu)_cVxUFi{_di@bdw(okj74v%PA0y8o+QgSe)I1J zPccp?mDUzQUS!j=I7SF5Yb&X?tZB7wO<#8^@(I`4bKU;|)QNHk2{F??00000NkvXX Hu0mjfoS$T5 literal 0 HcmV?d00001