From e50639291c4089267a3da8e4ec4c55c051780592 Mon Sep 17 00:00:00 2001 From: Jeija Date: Thu, 29 Mar 2012 11:49:37 +0200 Subject: [PATCH] Make pressure plates and object detector use the new rules system --- mesecons_detector/init.lua | 6 +++--- mesecons_pressureplates/init.lua | 13 +++++++------ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/mesecons_detector/init.lua b/mesecons_detector/init.lua index 28cedec..75e9b77 100644 --- a/mesecons_detector/init.lua +++ b/mesecons_detector/init.lua @@ -40,7 +40,7 @@ minetest.register_abm( end local objpos=obj:getpos() minetest.env:add_node(pos, {name="mesecons_detector:object_detector_on"}) - mesecon:receptor_on(pos, "pressureplate") + mesecon:receptor_on(pos, mesecon:get_rules("pressureplate")) end end end, @@ -68,7 +68,7 @@ minetest.register_abm( end if objectfound==0 then minetest.env:add_node(pos, {name="mesecons_detector:object_detector_off"}) - mesecon:receptor_off(pos, "pressureplate") + mesecon:receptor_off(pos, mesecon:get_rules("pressureplate")) end end, }) @@ -76,7 +76,7 @@ minetest.register_abm( minetest.register_on_dignode( function(pos, oldnode, digger) if oldnode.name == "mesecons_detector:object_detector_on" then - mesecon:receptor_off(pos, "pressureplate") + mesecon:receptor_off(pos, mesecon:get_rules("pressureplate")) end end ) diff --git a/mesecons_pressureplates/init.lua b/mesecons_pressureplates/init.lua index 7e6b31f..640423d 100644 --- a/mesecons_pressureplates/init.lua +++ b/mesecons_pressureplates/init.lua @@ -45,7 +45,7 @@ minetest.register_abm( local objpos=obj:getpos() if objpos.y>pos.y-1 and objpos.ypos.y-1 and objpos.y