aboutsummaryrefslogtreecommitdiff
path: root/advtrains_interlocking/database.lua
diff options
context:
space:
mode:
authorY. Wang <yw05@forksworld.de>2022-05-06 21:36:21 +0200
committerY. Wang <yw05@forksworld.de>2023-03-23 20:06:02 +0100
commit220563012d2aa2c753c791fa9faa38346f1355a5 (patch)
tree7f372b3b3ba28b7e235c87a6a5000e1233fdf6e2 /advtrains_interlocking/database.lua
parent9d5205e7e2a9ad5ed28e84776a5ab1186963a855 (diff)
downloadadvtrains-220563012d2aa2c753c791fa9faa38346f1355a5.tar.gz
advtrains-220563012d2aa2c753c791fa9faa38346f1355a5.tar.bz2
advtrains-220563012d2aa2c753c791fa9faa38346f1355a5.zip
Record signal aspect to avoid excessive get_aspect calls; report testing coverage
Diffstat (limited to 'advtrains_interlocking/database.lua')
-rw-r--r--advtrains_interlocking/database.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains_interlocking/database.lua b/advtrains_interlocking/database.lua
index 6787c50..efa5eb8 100644
--- a/advtrains_interlocking/database.lua
+++ b/advtrains_interlocking/database.lua
@@ -131,6 +131,9 @@ function ildb.load(data)
if data.npr_rails then
advtrains.interlocking.npr_rails = data.npr_rails
end
+ if data.supposed_aspects then
+ advtrains.interlocking.load_supposed_aspects(data.supposed_aspects)
+ end
--COMPATIBILITY to Signal aspect format
-- TODO remove in time...
@@ -173,6 +176,7 @@ function ildb.save()
rs_callbacks = advtrains.interlocking.route.rte_callbacks,
influence_points = influence_points,
npr_rails = advtrains.interlocking.npr_rails,
+ supposed_aspects = advtrains.interlocking.save_supposed_aspects(),
}
end