From adb803ce17e335400ba6ef451c359923d2af5581 Mon Sep 17 00:00:00 2001 From: Jeija Date: Sat, 3 Jan 2015 10:00:48 +0100 Subject: [PATCH] **This commit changes functionality**, please read Remove legacy code that enabled / disabled mesecon wires that were placed 2 blocks below a pressure plate. From now on, please place a vertical wire at that place. That way, no false signals will be triggered (the wire won't "flash" turned off if you enable it by a pressure plate and turn off a switch connected to it). If you depend on this functionality, please just revert this commit. That should be possible in the near future as well, since no major rewrites are planned for mesecons_pressureplates. In the long run, please update your mesecon strucutres to use vertical wires instead of relying on this old hack. --- mesecons_pressureplates/init.lua | 6 ------ 1 file changed, 6 deletions(-) diff --git a/mesecons_pressureplates/init.lua b/mesecons_pressureplates/init.lua index d01e6e5..0fda1f3 100644 --- a/mesecons_pressureplates/init.lua +++ b/mesecons_pressureplates/init.lua @@ -22,18 +22,12 @@ pp_on_timer = function (pos, elapsed) if objs[1] == nil and node.name == basename .. "_on" then minetest.add_node(pos, {name = basename .. "_off"}) mesecon.receptor_off(pos, mesecon.rules.pplate) - -- force deactivation of mesecon two blocks below (hacky) - if not mesecon.connected_to_receptor(two_below) then - mesecon.turnoff(two_below) - end else for k, obj in pairs(objs) do local objpos = obj:getpos() if objpos.y > pos.y-1 and objpos.y < pos.y then minetest.add_node(pos, {name = basename .. "_on"}) mesecon.receptor_on(pos, mesecon.rules.pplate ) - -- force activation of mesecon two blocks below (hacky) - mesecon.turnon(two_below) end end end