summaryrefslogtreecommitdiff
path: root/mesecons_temperest
diff options
context:
space:
mode:
authorWhiskers75 - <whiskers75@yopmail.com>2012-06-21 18:54:35 +0100
committerWhiskers75 - <whiskers75@yopmail.com>2012-06-21 18:54:35 +0100
commit28bca749be9779dcb483ca29f1c2855aad1f0bcb (patch)
tree8136c32b70d949989d3b8b3d25487955480cbd15 /mesecons_temperest
parentbd3bd4cf48914f505710bc9b2e16d6de47c2b618 (diff)
downloadmesecons-28bca749be9779dcb483ca29f1c2855aad1f0bcb.tar
mesecons-28bca749be9779dcb483ca29f1c2855aad1f0bcb.tar.gz
mesecons-28bca749be9779dcb483ca29f1c2855aad1f0bcb.tar.bz2
mesecons-28bca749be9779dcb483ca29f1c2855aad1f0bcb.tar.xz
mesecons-28bca749be9779dcb483ca29f1c2855aad1f0bcb.zip
AND block works! (YIPPEE!!!) See WHISKERS75_README.
Diffstat (limited to 'mesecons_temperest')
-rw-r--r--mesecons_temperest/init.lua30
-rw-r--r--mesecons_temperest/textures/whiskers75andblock.pngbin0 -> 364 bytes
2 files changed, 30 insertions, 0 deletions
diff --git a/mesecons_temperest/init.lua b/mesecons_temperest/init.lua
index 2bda111..c54f3e7 100644
--- a/mesecons_temperest/init.lua
+++ b/mesecons_temperest/init.lua
@@ -217,3 +217,33 @@ if ENABLE_TEMPEREST==1 then
}
})
end
+
+--End Temperest's code
+
+--Whiskers75's code
+--AND block
+
+local i
+
+
+-- Make the block:
+
+minetest.register_node ("mesecons_temperest:andblock", {
+ drawtype = raillike,
+ description = "AND block",
+ tile_images = {"whiskers75andblock.png"},
+ inventory_image = {"whiskers75andblock.png"},
+ sunlight_propagates = true,
+ paramtype = 'light',
+ walkable = true,
+ groups = {dig_immediate=2},
+ material = minetest.digprop_constanttime(1.0),
+ })
+
+minetest.register_on_punchnode(function(pos, node, puncher)
+ if node.name=="mesecons_temperest:andblock" then
+ anode = minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z})
+ bnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z})
+ if anode.name=="mesecons:mesecon_on" and bnode.name=="mesecons:mesecon_on" then mesecon:receptor_on({x=pos.x, y=pos.y+1, z=pos.z}) end
+ end
+end)
diff --git a/mesecons_temperest/textures/whiskers75andblock.png b/mesecons_temperest/textures/whiskers75andblock.png
new file mode 100644
index 0000000..63fc07a
--- /dev/null
+++ b/mesecons_temperest/textures/whiskers75andblock.png
Binary files differ