summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2012-06-21 13:56:12 +0200
committerJeija <norrepli@gmail.com>2012-06-21 13:56:12 +0200
commit1712523772ebc0e75eed7087d720276df9fed9de (patch)
tree1c2c7634854900a8f294371e0f91fdf8ac6232ca
parentdfc918a5f5a1ffb09d59d7bf758968933791bce0 (diff)
parent98014f0cd8f7f6219ae9f1451b7862e50aa9aac5 (diff)
downloadmesecons-1712523772ebc0e75eed7087d720276df9fed9de.tar
mesecons-1712523772ebc0e75eed7087d720276df9fed9de.tar.gz
mesecons-1712523772ebc0e75eed7087d720276df9fed9de.tar.bz2
mesecons-1712523772ebc0e75eed7087d720276df9fed9de.tar.xz
mesecons-1712523772ebc0e75eed7087d720276df9fed9de.zip
Merge branch 'master' of https://github.com/Jeija/minetest-mod-mesecons
-rw-r--r--mesecons_whiskers75/depends.txt3
-rw-r--r--mesecons_whiskers75/init.lua11
2 files changed, 14 insertions, 0 deletions
diff --git a/mesecons_whiskers75/depends.txt b/mesecons_whiskers75/depends.txt
new file mode 100644
index 0000000..fd42454
--- /dev/null
+++ b/mesecons_whiskers75/depends.txt
@@ -0,0 +1,3 @@
+default
+mesecons
+mesecons_temperest \ No newline at end of file
diff --git a/mesecons_whiskers75/init.lua b/mesecons_whiskers75/init.lua
new file mode 100644
index 0000000..dcb6185
--- /dev/null
+++ b/mesecons_whiskers75/init.lua
@@ -0,0 +1,11 @@
+--Whiskers75's code
+--AND block
+local update = function(pos)
+ local node = minetest.env:get_node(pos)
+ if node.name=="mesecons_whiskers75:andblock" then
+ lnode = minetest.env:get_node({x=pos.x-1, y=pos.y, z=pos.z})
+ if lnode.name=="mesecons:mesecon_on" then set_node_on({x=pos.x, y=pos.y+1, z=pos.z}) end
+ lnode = minetest.env:get_node({x=pos.x+1, y=pos.y, z=pos.z})
+ if lnode.name=="mesecons:mesecon_on" then set_node_on({x=pos.x, y=pos.y+1, z=pos.z}) end
+
+-- This SHOULD detect mesecons on x+ or -1 and turn a node y+1 on... \ No newline at end of file