Skip to content

Commit adb803c

Browse files
committedJan 3, 2015
**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.
1 parent dca4706 commit adb803c

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed
 

‎mesecons_pressureplates/init.lua

-6
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,12 @@ pp_on_timer = function (pos, elapsed)
2222
if objs[1] == nil and node.name == basename .. "_on" then
2323
minetest.add_node(pos, {name = basename .. "_off"})
2424
mesecon.receptor_off(pos, mesecon.rules.pplate)
25-
-- force deactivation of mesecon two blocks below (hacky)
26-
if not mesecon.connected_to_receptor(two_below) then
27-
mesecon.turnoff(two_below)
28-
end
2925
else
3026
for k, obj in pairs(objs) do
3127
local objpos = obj:getpos()
3228
if objpos.y > pos.y-1 and objpos.y < pos.y then
3329
minetest.add_node(pos, {name = basename .. "_on"})
3430
mesecon.receptor_on(pos, mesecon.rules.pplate )
35-
-- force activation of mesecon two blocks below (hacky)
36-
mesecon.turnon(two_below)
3731
end
3832
end
3933
end

0 commit comments

Comments
 (0)
Please sign in to comment.