mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-06-30 14:50:21 +02:00
Fix delayers and disable resuming if not using MESECONS_GLOBALSTEP
This commit is contained in:
@ -412,7 +412,9 @@ function mesecon:turnon(pos, rulename, recdepth)
|
||||
end
|
||||
|
||||
mesecon.queue:add_function("turnon", function (pos, rulename, recdepth)
|
||||
mesecon:turnon(pos, rulename, recdepth)
|
||||
if (MESECONS_GLOBALSTEP) then -- do not resume if we don't use globalstep - that would cause an endless loop
|
||||
mesecon:turnon(pos, rulename, recdepth)
|
||||
end
|
||||
end)
|
||||
|
||||
function mesecon:turnoff(pos, rulename, recdepth)
|
||||
@ -453,7 +455,9 @@ function mesecon:turnoff(pos, rulename, recdepth)
|
||||
end
|
||||
|
||||
mesecon.queue:add_function("turnoff", function (pos, rulename, recdepth)
|
||||
mesecon:turnoff(pos, rulename, recdepth)
|
||||
if (MESECONS_GLOBALSTEP) then -- do not resume if we don't use globalstep - that would cause an endless loop
|
||||
mesecon:turnoff(pos, rulename, recdepth)
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user