forked from Mirrorlandia_minetest/mesecons
Fix pressure plates calling receptor_on on a regular basis
This commit is contained in:
parent
eb416475cc
commit
aa5538a734
@ -22,7 +22,7 @@ pp_on_timer = function (pos, elapsed)
|
|||||||
if objs[1] == nil and node.name == basename .. "_on" then
|
if objs[1] == nil and node.name == basename .. "_on" then
|
||||||
minetest.add_node(pos, {name = basename .. "_off"})
|
minetest.add_node(pos, {name = basename .. "_off"})
|
||||||
mesecon.receptor_off(pos, mesecon.rules.pplate)
|
mesecon.receptor_off(pos, mesecon.rules.pplate)
|
||||||
else
|
elseif node.name == basename .. "_off" then
|
||||||
for k, obj in pairs(objs) do
|
for k, obj in pairs(objs) do
|
||||||
local objpos = obj:getpos()
|
local objpos = obj:getpos()
|
||||||
if objpos.y > pos.y-1 and objpos.y < pos.y then
|
if objpos.y > pos.y-1 and objpos.y < pos.y then
|
||||||
|
Loading…
Reference in New Issue
Block a user