~gpcf/advtrains-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[PATCH] Discard running interrupt and schedule events when LuaATC components are removed

Details
Message ID
<20241031100634.30024-1-git.maverick2797@gmail.com>
DKIM signature
pass
Download raw message
Patch: +4 -0
---
 advtrains_luaautomation/active_common.lua | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua
index 50fb2bc..533cc5f 100644
--- a/advtrains_luaautomation/active_common.lua
+++ b/advtrains_luaautomation/active_common.lua
@@ -55,6 +55,10 @@ end
function ac.after_dig_node(pos, node, player)
	advtrains.invalidate_all_paths(pos)
	advtrains.ndb.clear(pos)
	atlatc.interrupt.clear_ints_at_pos(pos)
	if advtrains.lines and advtrains.lines.sched then
		advtrains.lines.sched.discard_all(advtrains.encode_pos(pos))
	end
	local ph=minetest.pos_to_string(pos)
	ac.nodes[ph]=nil
end
-- 
2.46.0
Reply to thread Export thread (mbox)