aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking
diff options
context:
space:
mode:
Diffstat (limited to 'advtrains_interlocking')
-rw-r--r--advtrains_interlocking/routesetting.lua3
-rw-r--r--advtrains_interlocking/signal_api.lua6
-rw-r--r--advtrains_interlocking/signal_aspect_accessors.lua5
3 files changed, 11 insertions, 3 deletions
diff --git a/advtrains_interlocking/routesetting.lua b/advtrains_interlocking/routesetting.lua
index e792d28..9973569 100644
--- a/advtrains_interlocking/routesetting.lua
+++ b/advtrains_interlocking/routesetting.lua
@@ -341,7 +341,8 @@ function ilrs.update_route(sigd, tcbs, newrte, cancel)
end
else
--atdebug("Committed Route:",tcbs.routeset)
- has_changed_aspect = true
+ -- set_route now sets the signal aspects
+ --has_changed_aspect = true
end
end
if has_changed_aspect then
diff --git a/advtrains_interlocking/signal_api.lua b/advtrains_interlocking/signal_api.lua
index 1c6ed27..e615692 100644
--- a/advtrains_interlocking/signal_api.lua
+++ b/advtrains_interlocking/signal_api.lua
@@ -227,8 +227,10 @@ function advtrains.interlocking.signal_on_aspect_changed(pos)
local ipts, iconn = advtrains.interlocking.db.get_ip_by_signalpos(pos)
if not ipts then return end
local ipos = minetest.string_to_pos(ipts)
-
- advtrains.invalidate_all_paths_ahead(ipos)
+
+ -- FIXME: invalidate_all_paths_ahead does not appear to always work as expected
+ --advtrains.invalidate_all_paths_ahead(ipos)
+ minetest.after(0, advtrains.invalidate_all_paths, ipos)
end
function advtrains.interlocking.signal_rc_handler(pos, node, player, itemstack, pointed_thing)
diff --git a/advtrains_interlocking/signal_aspect_accessors.lua b/advtrains_interlocking/signal_aspect_accessors.lua
index e23aa13..a1cbd4e 100644
--- a/advtrains_interlocking/signal_aspect_accessors.lua
+++ b/advtrains_interlocking/signal_aspect_accessors.lua
@@ -108,6 +108,11 @@ local function set_aspect(pos, asp, skipdst)
if (not skipdst) and aspect_changed then
D.update_main(pos)
end
+ --[[
+ local dbgmsg = string.format("[%s]set_aspect(%s,%s,%s)", os.clock(), minetest.pos_to_string(pos), minetest.serialize(asp), tostring(skipdst))
+ dbgmsg = debug.traceback(dbgmsg, 2)
+ minetest.chat_send_all(dbgmsg)
+ --]]
end
end