Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
**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.
  • Loading branch information
Jeija committed Jan 3, 2015
1 parent dca4706 commit adb803c
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions mesecons_pressureplates/init.lua
Expand Up @@ -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
Expand Down

0 comments on commit adb803c

Please sign in to comment.