summaryrefslogtreecommitdiff
path: root/mesecons_random/init.lua
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2013-02-07 08:49:24 -0800
committerJeija <norrepli@gmail.com>2013-02-07 08:49:24 -0800
commitccb343054072c27b27320ffb82fc8b5c6393c4d1 (patch)
tree799a60de6c653ebf6a3ce6e28184f65c3790b012 /mesecons_random/init.lua
parente3c9eded2a071e63701a02cfe052cdcc6e327cfa (diff)
parent43cb2588772df39f401e0a53e5cecd42fdc052ba (diff)
downloadmesecons-ccb343054072c27b27320ffb82fc8b5c6393c4d1.tar
mesecons-ccb343054072c27b27320ffb82fc8b5c6393c4d1.tar.gz
mesecons-ccb343054072c27b27320ffb82fc8b5c6393c4d1.tar.bz2
mesecons-ccb343054072c27b27320ffb82fc8b5c6393c4d1.tar.xz
mesecons-ccb343054072c27b27320ffb82fc8b5c6393c4d1.zip
Merge pull request #70 from khonkhortisan/eghoststone
Make ghoststone conductive
Diffstat (limited to 'mesecons_random/init.lua')
-rw-r--r--mesecons_random/init.lua30
1 files changed, 22 insertions, 8 deletions
diff --git a/mesecons_random/init.lua b/mesecons_random/init.lua
index 4fc2f6e..78c3825 100644
--- a/mesecons_random/init.lua
+++ b/mesecons_random/init.lua
@@ -31,10 +31,17 @@ minetest.register_node("mesecons_random:ghoststone", {
inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"),
groups = {cracky=3},
sounds = default.node_sound_stone_defaults(),
- mesecons = {effector = {
- action_on = function (pos, node)
- minetest.env:add_node(pos, {name="mesecons_random:ghoststone_active"})
- end
+ mesecons = {conductor = {
+ state = mesecon.state.off,
+ rules = { --axes
+ {x = -1, y = 0, z = 0},
+ {x = 1, y = 0, z = 0},
+ {x = 0, y = -1, z = 0},
+ {x = 0, y = 1, z = 0},
+ {x = 0, y = 0, z = -1},
+ {x = 0, y = 0, z = 1},
+ },
+ onstate = "mesecons_random:ghoststone_active"
}}
})
@@ -44,10 +51,17 @@ minetest.register_node("mesecons_random:ghoststone_active", {
walkable = false,
diggable = false,
sunlight_propagates = true,
- mesecons = {effector = {
- action_off = function (pos, node)
- minetest.env:add_node(pos, {name="mesecons_random:ghoststone"})
- end
+ mesecons = {conductor = {
+ state = mesecon.state.on,
+ rules = {
+ {x = -1, y = 0, z = 0},
+ {x = 1, y = 0, z = 0},
+ {x = 0, y = -1, z = 0},
+ {x = 0, y = 1, z = 0},
+ {x = 0, y = 0, z = -1},
+ {x = 0, y = 0, z = 1},
+ },
+ offstate = "mesecons_random:ghoststone"
}}
})