aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/environment.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2019-06-19 10:29:02 +0200
committerorwell96 <orwell@bleipb.de>2019-06-19 10:29:02 +0200
commitd569863434c2720444ce4302e3fbcbdfd8c69f82 (patch)
tree36a3c8ec7169f828341bca1dabd9e93f00e30503 /advtrains_luaautomation/environment.lua
parent24e56dbfc2b29229ed6253b84635a16db87659fb (diff)
downloadadvtrains-d569863434c2720444ce4302e3fbcbdfd8c69f82.tar.gz
advtrains-d569863434c2720444ce4302e3fbcbdfd8c69f82.tar.bz2
advtrains-d569863434c2720444ce4302e3fbcbdfd8c69f82.zip
Railway Time: atlatc interface, improve util functions
Diffstat (limited to 'advtrains_luaautomation/environment.lua')
-rw-r--r--advtrains_luaautomation/environment.lua21
1 files changed, 21 insertions, 0 deletions
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