From d569863434c2720444ce4302e3fbcbdfd8c69f82 Mon Sep 17 00:00:00 2001 From: orwell96 Date: Wed, 19 Jun 2019 10:29:02 +0200 Subject: Railway Time: atlatc interface, improve util functions --- advtrains_luaautomation/environment.lua | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'advtrains_luaautomation') diff --git a/advtrains_luaautomation/environment.lua b/advtrains_luaautomation/environment.lua index e0bfa69..21e86ff 100644 --- a/advtrains_luaautomation/environment.lua +++ b/advtrains_luaautomation/environment.lua @@ -223,6 +223,27 @@ if advtrains.interlocking then end end +-- Lines-specific: +if advtrains.lines then + local atlrwt = advtrains.lines.rwt + static_env.rwt = { + now = atlrwt.now, + new = atlrwt.new, + copy = atlrwt.copy, + from_sec = atlrwt.from_sec, + to_sec = atlrwt.to_sec, + add = atlrwt.add, + add_secs = atlrwt.add_secs, + diff = atlrwt.diff, + sub = atlrwt.sub, + adj_diff = atlrwt.adj_diff, + adjust_cycle = atlrwt.adjust_cycle, + adjust = atlrwt.adjust, + to_string = atlrwt.to_string, + get_time_until = atlrwt.get_time_until, + } +end + for _, name in pairs(safe_globals) do static_env[name] = _G[name] end -- cgit v1.2.3