summaryrefslogtreecommitdiff
path: root/mesecons_pressureplates
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2015-01-03 10:00:48 +0100
committerJeija <norrepli@gmail.com>2015-01-03 10:12:20 +0100
commitadb803ce17e335400ba6ef451c359923d2af5581 (patch)
treeb7e60d18a1acb9b336f452658023e6a7df9c0729 /mesecons_pressureplates
parentdca4706c7ff36abd467fbfcfcbb210b1d11ceba7 (diff)
downloadmesecons-adb803ce17e335400ba6ef451c359923d2af5581.tar
mesecons-adb803ce17e335400ba6ef451c359923d2af5581.tar.gz
mesecons-adb803ce17e335400ba6ef451c359923d2af5581.tar.bz2
mesecons-adb803ce17e335400ba6ef451c359923d2af5581.tar.xz
mesecons-adb803ce17e335400ba6ef451c359923d2af5581.zip
**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.
Diffstat (limited to 'mesecons_pressureplates')
-rw-r--r--mesecons_pressureplates/init.lua6
1 files changed, 0 insertions, 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