Add register_function command so mods can register their own functons, low-level interface for departure boards

This commit is contained in:
gpcf 2023-05-14 19:48:30 +02:00 committed by orwell
parent 2ea4a8cff1
commit b28ceaa2b4
1 changed files with 5 additions and 0 deletions

View File

@ -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