summaryrefslogtreecommitdiff
path: root/durt/nodes/(-2132,8,914).lua
diff options
context:
space:
mode:
Diffstat (limited to 'durt/nodes/(-2132,8,914).lua')
-rw-r--r--durt/nodes/(-2132,8,914).lua29
1 files changed, 17 insertions, 12 deletions
diff --git a/durt/nodes/(-2132,8,914).lua b/durt/nodes/(-2132,8,914).lua
index ec8cd4a..5229dce 100644
--- a/durt/nodes/(-2132,8,914).lua
+++ b/durt/nodes/(-2132,8,914).lua
@@ -1,17 +1,22 @@
-local trigger = POS(-2130,21,925)
-if event.train then
- if getstate(trigger)=="off" then return end
- digiline_send("ars_set_query",true)
- return
-end
+local ch = {
+ get = "ars_set_query",
+ input = "ars_set",
+ indicator = "ars_indicator",
+}
-if event.digiline and event.channel=="ars_set" and atc_id then
- set_rc(event.msg)
- setstate(trigger,"off")
+if event.train then
+ digiline_send(ch.get, "GET")
return
end
-if event.digiline and event.channel=="ars_indicator" then
- setstate(trigger,event.msg)
- return
+if event.digiline then
+ if event.channel==ch.input then
+ if not atc_id then
+ digiline_send(ch.indicator, true)
+ return
+ end
+ set_rc(tostring(event.msg))
+ digiline_send(ch.indicator, false)
+ return
+ end
end \ No newline at end of file