diff options
author | gpcf <gabriel@gpcf.eu> | 2023-05-14 19:48:30 +0200 |
---|---|---|
committer | orwell <orwell@bleipb.de> | 2024-02-06 23:13:13 +0100 |
commit | b28ceaa2b48f39855183b982c9668d0154a626df (patch) | |
tree | fb2e4e515ed8be5e97863fbe6ea97a0b3cc9bf75 /advtrains_luaautomation/environment.lua | |
parent | 2ea4a8cff1d8e335fda472e4c7988424ca522610 (diff) | |
download | advtrains-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/environment.lua')
-rw-r--r-- | advtrains_luaautomation/environment.lua | 5 |
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 |