diff options
author | Anthony Zhang <azhang9@gmail.com> | 2012-09-27 17:25:58 -0400 |
---|---|---|
committer | Anthony Zhang <azhang9@gmail.com> | 2012-09-27 17:25:58 -0400 |
commit | ecefc937c9be82cb279c7beda6215b96540c41c8 (patch) | |
tree | 3b0001a90db70d906d567b52c8ea5fd9080198df | |
parent | 1da390d2635646f9ee5148df5147a8d4771e9c76 (diff) | |
download | mesecons-ecefc937c9be82cb279c7beda6215b96540c41c8.tar mesecons-ecefc937c9be82cb279c7beda6215b96540c41c8.tar.gz mesecons-ecefc937c9be82cb279c7beda6215b96540c41c8.tar.bz2 mesecons-ecefc937c9be82cb279c7beda6215b96540c41c8.tar.xz mesecons-ecefc937c9be82cb279c7beda6215b96540c41c8.zip |
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.
-rw-r--r-- | mesecons_random/init.lua | 60 | ||||
-rw-r--r-- | mesecons_textures/textures/jeija_ghoststone.png | bin | 0 -> 743 bytes | |||
-rw-r--r-- | mesecons_textures/textures/jeija_ghoststone_inv.png | bin | 0 -> 777 bytes |
3 files changed, 52 insertions, 8 deletions
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 Binary files differnew file mode 100644 index 0000000..1917b7c --- /dev/null +++ b/mesecons_textures/textures/jeija_ghoststone.png diff --git a/mesecons_textures/textures/jeija_ghoststone_inv.png b/mesecons_textures/textures/jeija_ghoststone_inv.png Binary files differnew file mode 100644 index 0000000..c715d7f --- /dev/null +++ b/mesecons_textures/textures/jeija_ghoststone_inv.png |