From 1227456d46a5e47fa744c37bbf92e05515a871a2 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Fri, 15 Mar 2019 17:12:10 +0100 Subject: Ugly workaround for green signals bug --- advtrains/init.lua | 3 +++ advtrains_interlocking/ars.lua | 3 +++ 2 files changed, 6 insertions(+) diff --git a/advtrains/init.lua b/advtrains/init.lua index 8173a22..14a5a02 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -459,6 +459,9 @@ function advtrains.save(remove_players_from_wagons) atlatc.save() end atprint("[save_all]Saved advtrains save files") + + --TODO very simple yet hacky workaround for the "green signals" bug + advtrains.invalidate_all_paths() end minetest.register_on_shutdown(advtrains.save) diff --git a/advtrains_interlocking/ars.lua b/advtrains_interlocking/ars.lua index dd5ff40..ef5d0da 100644 --- a/advtrains_interlocking/ars.lua +++ b/advtrains_interlocking/ars.lua @@ -124,5 +124,8 @@ function advtrains.interlocking.ars_check(sigd, train) --delay routesetting, it should not occur inside train step -- using after here is OK because that gets called on every path recalculation minetest.after(0, il.route.update_route, sigd, tcbs, rteid, nil) + else + -- just "punch" routesetting, just in case callback got lost. + minetest.after(0, il.route.update_route, sigd, tcbs, nil, nil) end end -- cgit v1.2.3