diff options
author | Maverick2797 <git.maverick2797@gmail.com> | 2024-10-31 18:06:33 +0800 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2024-11-09 22:32:51 +0100 |
commit | 19d8e8c1a7dc82fa0ca1f65f04936e22c8b6e2a7 (patch) | |
tree | 9c6cac1f009b36f330bafec73410e5f0200a6b85 | |
parent | 715efe22939bbe472ba4a2c81c74e64c45726bc2 (diff) | |
download | advtrains-19d8e8c1a7dc82fa0ca1f65f04936e22c8b6e2a7.tar.gz advtrains-19d8e8c1a7dc82fa0ca1f65f04936e22c8b6e2a7.tar.bz2 advtrains-19d8e8c1a7dc82fa0ca1f65f04936e22c8b6e2a7.zip |
Discard running interrupt and schedule events when LuaATC components are removed
-rw-r--r-- | advtrains_luaautomation/active_common.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains_luaautomation/active_common.lua b/advtrains_luaautomation/active_common.lua index 1a7009f..074d3b3 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 |