diff options
author | DS <vorunbekannt75@web.de> | 2017-10-04 00:19:09 +0200 |
---|---|---|
committer | Vitaliy <silverunicorn2011@yandex.ru> | 2017-10-04 01:19:09 +0300 |
commit | 0b3039e9a9cd336356496d8d08e272d7483bf64a (patch) | |
tree | 9737c95bd644193e82e880d84b0226b1f084a1cf | |
parent | 1f5601661e253c7ba4ea2c851772b14e2bd6cd3f (diff) | |
download | mesecons-0b3039e9a9cd336356496d8d08e272d7483bf64a.tar mesecons-0b3039e9a9cd336356496d8d08e272d7483bf64a.tar.gz mesecons-0b3039e9a9cd336356496d8d08e272d7483bf64a.tar.bz2 mesecons-0b3039e9a9cd336356496d8d08e272d7483bf64a.tar.xz mesecons-0b3039e9a9cd336356496d8d08e272d7483bf64a.zip |
Make removestone check nodes above for falling (#357)
Fixes a part of #290.
-rw-r--r-- | mesecons_random/init.lua | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/mesecons_random/init.lua b/mesecons_random/init.lua index 5a6ef24..326362e 100644 --- a/mesecons_random/init.lua +++ b/mesecons_random/init.lua @@ -10,6 +10,7 @@ minetest.register_node("mesecons_random:removestone", { action_on = function (pos, node) minetest.remove_node(pos) mesecon.on_dignode(pos, node) + minetest.check_for_falling(vector.add(pos, vector.new(0, 1, 0))) end }} }) @@ -34,14 +35,7 @@ minetest.register_node("mesecons_random:ghoststone", { sounds = default.node_sound_stone_defaults(), 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}, - }, + rules = mesecon.rules.alldirs, onstate = "mesecons_random:ghoststone_active" }} }) @@ -56,14 +50,7 @@ minetest.register_node("mesecons_random:ghoststone_active", { drop = "mesecons_random:ghoststone", 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}, - }, + rules = mesecon.rules.alldirs, offstate = "mesecons_random:ghoststone" }}, on_construct = function(pos) |