diff options
author | orwell96 <orwell@bleipb.de> | 2019-06-19 09:56:30 +0200 |
---|---|---|
committer | orwell96 <orwell@bleipb.de> | 2019-06-19 09:56:30 +0200 |
commit | 24e56dbfc2b29229ed6253b84635a16db87659fb (patch) | |
tree | f098bf7e85fde9d8c9221f5bf155dfc37ef52c8c /advtrains_line_automation/init.lua | |
parent | d6cfa7dbf62887ba4b408900946ade28f7ca12c3 (diff) | |
download | advtrains-24e56dbfc2b29229ed6253b84635a16db87659fb.tar.gz advtrains-24e56dbfc2b29229ed6253b84635a16db87659fb.tar.bz2 advtrains-24e56dbfc2b29229ed6253b84635a16db87659fb.zip |
Railway Time: Basic time counter and utility functions
Diffstat (limited to 'advtrains_line_automation/init.lua')
-rw-r--r-- | advtrains_line_automation/init.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/advtrains_line_automation/init.lua b/advtrains_line_automation/init.lua index 5609524..eba288f 100644 --- a/advtrains_line_automation/init.lua +++ b/advtrains_line_automation/init.lua @@ -18,6 +18,7 @@ advtrains.lines = { local modpath = minetest.get_modpath(minetest.get_current_modname()) .. DIR_DELIM +dofile(modpath.."railwaytime.lua") dofile(modpath.."stoprail.lua") @@ -25,12 +26,19 @@ function advtrains.lines.load(data) if data then advtrains.lines.stations = data.stations or {} advtrains.lines.stops = data.stops or {} + advtrains.lines.rwt.set_time(data.rwt_time) end end function advtrains.lines.save() return { stations = advtrains.lines.stations, - stops = advtrains.lines.stops + stops = advtrains.lines.stops, + rwt_time = advtrains.lines.rwt.get_time() } end + +function advtrains.lines.step(dtime) + advtrains.lines.rwt.step(dtime) + atdebug(advtrains.lines.rwt.now()) +end |