aboutsummaryrefslogtreecommitdiff
path: root/advtrains_luaautomation/environment.lua
diff options
context:
space:
mode:
authororwell <orwell@bleipb.de>2025-01-09 00:57:32 +0100
committerorwell <orwell@bleipb.de>2025-01-09 08:38:09 +0100
commit8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c (patch)
treec5915919c6efe856207d136404846f6ed86670ae /advtrains_luaautomation/environment.lua
parent9bd34f738663cdc268db6399ecb6aaba2d4c9a28 (diff)
downloadadvtrains-8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c.tar.gz
advtrains-8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c.tar.bz2
advtrains-8c91ce1ec178d6d49f3ddefc57d99eecd0caef3c.zip
Various bugfixes found in lunixforks debug
Diffstat (limited to 'advtrains_luaautomation/environment.lua')
-rw-r--r--advtrains_luaautomation/environment.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/advtrains_luaautomation/environment.lua b/advtrains_luaautomation/environment.lua
index b54d45c..a6ed2c7 100644
--- a/advtrains_luaautomation/environment.lua
+++ b/advtrains_luaautomation/environment.lua
@@ -226,11 +226,15 @@ if advtrains.interlocking then
end
static_env.get_aspect = function(signal)
local pos = atlatc.pcnaming.resolve_pos(signal)
- return advtrains.interlocking.signal_get_aspect(pos)
+ return advtrains.interlocking.signal.get_aspect_info(pos)
end
- static_env.set_aspect = function(signal, asp)
+ static_env.set_aspect = function(signal, main_asp, rem_signal)
+ if type(main_asp) == "table" then
+ error("set_aspect: Parameters of this method have changed to (signal, main_asp, rem_signal) with introduction of distant signalling: parameter 2 is now the main aspect name (a string)")
+ end
local pos = atlatc.pcnaming.resolve_pos(signal)
- return advtrains.interlocking.signal_set_aspect(pos,asp)
+ local rem_pos = rem_signal and atlatc.pcnaming.resolve_pos(rem_signal)
+ return advtrains.interlocking.signal_set_aspect(pos, main_asp, rem_pos)
end
--section_occupancy()