diff options
Diffstat (limited to 'advtrains_line_automation/init.lua')
-rw-r--r-- | advtrains_line_automation/init.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/advtrains_line_automation/init.lua b/advtrains_line_automation/init.lua index 0f4a4eb..7b758bc 100644 --- a/advtrains_line_automation/init.lua +++ b/advtrains_line_automation/init.lua @@ -19,6 +19,7 @@ advtrains.lines = { local modpath = minetest.get_modpath(minetest.get_current_modname()) .. DIR_DELIM dofile(modpath.."railwaytime.lua") +dofile(modpath.."scheduler.lua") dofile(modpath.."stoprail.lua") @@ -27,6 +28,7 @@ function advtrains.lines.load(data) advtrains.lines.stations = data.stations or {} advtrains.lines.stops = data.stops or {} advtrains.lines.rwt.set_time(data.rwt_time) + advtrains.lines.sched.load(data.scheduler_queue) end end @@ -34,10 +36,12 @@ function advtrains.lines.save() return { stations = advtrains.lines.stations, stops = advtrains.lines.stops, - rwt_time = advtrains.lines.rwt.get_time() + rwt_time = advtrains.lines.rwt.get_time(), + scheduler_queue = advtrains.lines.sched.save() } end function advtrains.lines.step(dtime) advtrains.lines.rwt.step(dtime) + advtrains.lines.sched.run() end |