From 9057c206104ddddcfb2239187c04db41d90387c8 Mon Sep 17 00:00:00 2001 From: gpcf Date: Sun, 14 May 2023 19:48:30 +0200 Subject: Add low-level interface for departure boards --- advtrains_luaautomation/environment.lua | 6 ++++++ advtrains_luaautomation/mod.conf | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/advtrains_luaautomation/environment.lua b/advtrains_luaautomation/environment.lua index d85bedc..3499903 100644 --- a/advtrains_luaautomation/environment.lua +++ b/advtrains_luaautomation/environment.lua @@ -259,6 +259,12 @@ if advtrains.lines then } end +if departureboards then + static_env.departureboard_set = function(pos, tb) + departureboards.contents[minetest.hash_node_position(pos)] = tb + end +end + for _, name in pairs(safe_globals) do static_env[name] = _G[name] end diff --git a/advtrains_luaautomation/mod.conf b/advtrains_luaautomation/mod.conf index a737603..f135d8f 100644 --- a/advtrains_luaautomation/mod.conf +++ b/advtrains_luaautomation/mod.conf @@ -4,4 +4,4 @@ description=Lua control interface to Advanced Trains author=orwell96 depends=advtrains -optional_depends=advtrains_interlocking,advtrains_line_automation,mesecons_switch +optional_depends=advtrains_interlocking,advtrains_line_automation,mesecons_switch,departureboards -- cgit v1.2.3