diff options
author | orwell96 <orwell@bleipb.de> | 2018-06-21 20:34:20 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-06-21 20:34:20 +0200 |
commit | e1ebbff23c10213c4bc9f54bff0870810430cf9d (patch) | |
tree | eabd17b21a3f035cd029d4fb088ede153d226fcc /advtrains/init.lua | |
parent | 5992618ee837351124f59c1c0289391a9d501ade (diff) | |
download | advtrains-e1ebbff23c10213c4bc9f54bff0870810430cf9d.tar.gz advtrains-e1ebbff23c10213c4bc9f54bff0870810430cf9d.tar.bz2 advtrains-e1ebbff23c10213c4bc9f54bff0870810430cf9d.zip |
Add track section concept and rework TCB design, implement new linking behavior
Diffstat (limited to 'advtrains/init.lua')
-rw-r--r-- | advtrains/init.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua index de72ea1..e676944 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -200,6 +200,9 @@ function advtrains.avt_load() advtrains.player_to_train_mapping = tbl.ptmap or {} advtrains.ndb.load_data(tbl.ndb) advtrains.atc.load_data(tbl.atc) + if advtrains.interlocking then + --advtrains.interlocking.db.load(tbl.interlocking) + end --remove wagon_save entries that are not part of a train local todel=advtrains.merge_tables(advtrains.wagon_save) for tid, train in pairs(advtrains.trains) do @@ -291,12 +294,17 @@ advtrains.avt_save = function(remove_players_from_wagons) --versions: -- 1 - Initial new save format. + local il_save + if advtrains.interlocking then + il_save = advtrains.interlocking.db.save() + end local save_tbl={ trains = tmp_trains, wagon_save = advtrains.wagons, ptmap = advtrains.player_to_train_mapping, atc = advtrains.atc.save_data(), ndb = advtrains.ndb.save_data(), + interlocking = il_save, version = 1, } local datastr = minetest.serialize(save_tbl) |