aboutsummaryrefslogtreecommitdiff
path: root/advtrains/init.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2018-02-21 19:32:41 +0100
committerorwell96 <orwell@bleipb.de>2018-06-14 17:39:42 +0200
commit3420a1a912b83917d6674c1fa14a3f884eb25bc2 (patch)
treec333ff30412a95c5cb464ca192de963c95aa522c /advtrains/init.lua
parentda0e7ac7567059a88f76069b55350d52056e60d6 (diff)
downloadadvtrains-3420a1a912b83917d6674c1fa14a3f884eb25bc2.tar.gz
advtrains-3420a1a912b83917d6674c1fa14a3f884eb25bc2.tar.bz2
advtrains-3420a1a912b83917d6674c1fa14a3f884eb25bc2.zip
Restructure path system
The changes to the path system have not yet been integrated...
Diffstat (limited to 'advtrains/init.lua')
-rw-r--r--advtrains/init.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua
index 65e5048..0043c22 100644
--- a/advtrains/init.lua
+++ b/advtrains/init.lua
@@ -184,6 +184,10 @@ function advtrains.avt_load()
if tbl.version then
--congrats, we have the new save format.
advtrains.trains = tbl.trains
+ --Save the train id into the train table to avoid having to pass id around
+ for id, train in pairs(advtrains.trains) do
+ train.id = id
+ end
advtrains.wagon_save = tbl.wagon_save
advtrains.player_to_train_mapping = tbl.ptmap or {}
advtrains.ndb.load_data(tbl.ndb)