diff options
author | Jeija <jeija@mesecons.net> | 2014-11-22 12:28:45 +0100 |
---|---|---|
committer | Jeija <jeija@mesecons.net> | 2014-11-22 12:30:39 +0100 |
commit | b5cc933287b9dcd1d2e9b999398f93023e89fccc (patch) | |
tree | f2fadaaf30c9a5d4b294611a8b15e26897041b2b /mesecons_detector | |
parent | 194155fff8e848750dc716fd920045b3c340310d (diff) |
Pressure plates and the object detector will send power to vertical
wires 2 nodes below them, allows to hide circuitry powered by them.
Fixes #179
Rewrite pressure plates + vertical wires using mesecon.register_node.
Diffstat (limited to 'mesecons_detector')
-rw-r--r-- | mesecons_detector/init.lua | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mesecons_detector/init.lua b/mesecons_detector/init.lua index 8d2f53c..d7e9d41 100644 --- a/mesecons_detector/init.lua +++ b/mesecons_detector/init.lua @@ -55,7 +55,8 @@ minetest.register_node("mesecons_detector:object_detector_off", { groups = {cracky=3}, description="Player Detector", mesecons = {receptor = { - state = mesecon.state.off + state = mesecon.state.off, + rules = mesecon.rules.pplate }}, on_construct = object_detector_make_formspec, on_receive_fields = object_detector_on_receive_fields, @@ -70,7 +71,8 @@ minetest.register_node("mesecons_detector:object_detector_on", { groups = {cracky=3,not_in_creative_inventory=1}, drop = 'mesecons_detector:object_detector_off', mesecons = {receptor = { - state = mesecon.state.on + state = mesecon.state.on, + rules = mesecon.rules.pplate }}, on_construct = object_detector_make_formspec, on_receive_fields = object_detector_on_receive_fields, @@ -94,7 +96,7 @@ minetest.register_abm( action = function(pos) if object_detector_scan(pos) then minetest.swap_node(pos, {name = "mesecons_detector:object_detector_on"}) - mesecon:receptor_on(pos) + mesecon:receptor_on(pos, mesecon.rules.pplate) end end, }) @@ -106,7 +108,7 @@ minetest.register_abm( action = function(pos) if not object_detector_scan(pos) then minetest.swap_node(pos, {name = "mesecons_detector:object_detector_off"}) - mesecon:receptor_off(pos) + mesecon:receptor_off(pos, mesecon.rules.pplate) end end, }) |