aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation
diff options
context:
space:
mode:
authorgpcf <gabriel@gpcf.eu>2023-05-14 19:48:30 +0200
committerorwell <orwell@bleipb.de>2024-02-06 23:13:13 +0100
commitb28ceaa2b48f39855183b982c9668d0154a626df (patch)
treefb2e4e515ed8be5e97863fbe6ea97a0b3cc9bf75 /advtrains_luaautomation
parent2ea4a8cff1d8e335fda472e4c7988424ca522610 (diff)
downloadadvtrains-b28ceaa2b48f39855183b982c9668d0154a626df.tar.gz
advtrains-b28ceaa2b48f39855183b982c9668d0154a626df.tar.bz2
advtrains-b28ceaa2b48f39855183b982c9668d0154a626df.zip
Add register_function command so mods can register their own functons, low-level interface for departure boards
Diffstat (limited to 'advtrains_luaautomation')
-rw-r--r--advtrains_luaautomation/environment.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/advtrains_luaautomation/environment.lua b/advtrains_luaautomation/environment.lua
index 9fcba1d..6df5248 100644
--- a/advtrains_luaautomation/environment.lua
+++ b/advtrains_luaautomation/environment.lua
@@ -262,6 +262,11 @@ if advtrains.lines then
}
end
+
+atlatc.register_function = function (name, f)
+ static_env[name] = f
+end
+
for _, name in pairs(safe_globals) do
static_env[name] = _G[name]
end