aboutsummaryrefslogtreecommitdiff
path: root/advtrains/signals.lua
diff options
context:
space:
mode:
authororwell96 <orwell@bleipb.de>2020-06-12 12:32:46 +0200
committerorwell96 <orwell@bleipb.de>2021-02-10 16:36:24 +0100
commit61329c11a28ca0d68f95f189d3a66c373d7dddc3 (patch)
tree8e57504f17c86efdadf2b8494e3427e4f947a001 /advtrains/signals.lua
parentd3b2f614be059e65869a615fe319118c0a354995 (diff)
downloadadvtrains-61329c11a28ca0d68f95f189d3a66c373d7dddc3.tar.gz
advtrains-61329c11a28ca0d68f95f189d3a66c373d7dddc3.tar.bz2
advtrains-61329c11a28ca0d68f95f189d3a66c373d7dddc3.zip
Start using path_invalidate_ahead()
Diffstat (limited to 'advtrains/signals.lua')
-rw-r--r--advtrains/signals.lua17
1 files changed, 16 insertions, 1 deletions
diff --git a/advtrains/signals.lua b/advtrains/signals.lua
index 68cbc70..9df2f99 100644
--- a/advtrains/signals.lua
+++ b/advtrains/signals.lua
@@ -20,6 +20,18 @@ return {
}
end
+local suppasp = {
+ main = {0, false},
+ dst = {false},
+ shunt = nil,
+ proceed_as_main = true,
+ info = {
+ call_on = false,
+ dead_end = false,
+ w_speed = nil,
+ }
+}
+
for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red", als="green"}}) do
advtrains.trackplacer.register_tracktype("advtrains:retrosignal", "")
@@ -81,7 +93,8 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
end,
get_aspect = function(pos, node)
return aspect(r=="on")
- end
+ end,
+ supported_aspects = suppasp,
},
can_dig = can_dig_func,
})
@@ -141,6 +154,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
get_aspect = function(pos, node)
return aspect(r=="on")
end,
+ supported_aspects = suppasp,
getstate = f.ls,
setstate = function(pos, node, newstate)
if newstate == f.als then
@@ -209,6 +223,7 @@ for r,f in pairs({on={as="off", ls="green", als="red"}, off={as="on", ls="red",
get_aspect = function(pos, node)
return aspect(r=="on")
end,
+ supported_aspects = suppasp,
getstate = f.ls,
setstate = function(pos, node, newstate)
if newstate == f.als then