diff options
author | orwell96 <orwell@bleipb.de> | 2018-11-29 17:52:56 +0100 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2018-11-29 17:52:56 +0100 |
commit | ec68eaa22975305af3e184bc3c946a253b5504eb (patch) | |
tree | baf865eec03c343eacba73282d4fdbf377d26568 /advtrains/init.lua | |
parent | 01ffee4d58316c74c90a36b491770ee358fd3f98 (diff) | |
download | advtrains-ec68eaa22975305af3e184bc3c946a253b5504eb.tar.gz advtrains-ec68eaa22975305af3e184bc3c946a253b5504eb.tar.bz2 advtrains-ec68eaa22975305af3e184bc3c946a253b5504eb.zip |
Added on_train_approach callback, non-permanent external LZB brakepoints and basis for "stop rails"
Stop rails ATM use the aforementioned things to add a pointwise "2" speed restriction. Seems to work.
Diffstat (limited to 'advtrains/init.lua')
-rw-r--r-- | advtrains/init.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/advtrains/init.lua b/advtrains/init.lua index 9d20722..5d1af41 100644 --- a/advtrains/init.lua +++ b/advtrains/init.lua @@ -194,6 +194,9 @@ dofile(advtrains.modpath.."/passive.lua") --load/save +-- backup variables, used if someone should accidentally delete a sub-mod +local MDS_interlocking + advtrains.fpath=minetest.get_worldpath().."/advtrains" dofile(advtrains.modpath.."/log.lua") @@ -219,6 +222,8 @@ function advtrains.avt_load() advtrains.atc.load_data(tbl.atc) if advtrains.interlocking then advtrains.interlocking.db.load(tbl.interlocking) + else + MDS_interlocking = tbl.interlocking end --remove wagon_save entries that are not part of a train local todel=advtrains.merge_tables(advtrains.wagon_save) @@ -318,6 +323,8 @@ advtrains.avt_save = function(remove_players_from_wagons) local il_save if advtrains.interlocking then il_save = advtrains.interlocking.db.save() + else + il_save = MDS_interlocking end local save_tbl={ trains = tmp_trains, |