summaryrefslogtreecommitdiff
path: root/durt/nodes
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-04-22 14:54:26 +0200
committerautocommitter <autocommitter@linux-forks.de>2024-04-22 14:54:26 +0200
commit50213cc26cb40c9b5c116f87a55cf73f65370ff7 (patch)
tree20421062b206d9660ee36e0a1b530ca0a6a8f059 /durt/nodes
parent6f62cd12026f0d43df4df8d2857bfe642fb16d9b (diff)
downloadluaatc_envs-50213cc26cb40c9b5c116f87a55cf73f65370ff7.tar.gz
luaatc_envs-50213cc26cb40c9b5c116f87a55cf73f65370ff7.tar.bz2
luaatc_envs-50213cc26cb40c9b5c116f87a55cf73f65370ff7.zip
State at 2021-09-21
Diffstat (limited to 'durt/nodes')
-rw-r--r--durt/nodes/(1921,7,9096).lua19
1 files changed, 18 insertions, 1 deletions
diff --git a/durt/nodes/(1921,7,9096).lua b/durt/nodes/(1921,7,9096).lua
index 32d89d7..b95783f 100644
--- a/durt/nodes/(1921,7,9096).lua
+++ b/durt/nodes/(1921,7,9096).lua
@@ -1 +1,18 @@
-if event.digiline then if event.channel ~= "track_control" then return end local err = 0 if not atc_id then err = 1 end if not atc_arrow then err = 1 end if type(event.msg) ~= "table" then err = 1 end if err == 1 then digiline_send("lcd","--Error-- | Check Train") return end local i = event.msg set_rc(i.ars or "") atc_set_text_inside("Destination: "..(i.name or "Unknown").."\nCargo: "..(i.info or "Unknown")) end \ No newline at end of file
+if event.digiline then
+ if event.channel ~= "track_control" then return end
+
+ local err = 0
+ if not atc_id then err = 1 end
+ if not atc_arrow then err = 1 end
+ if type(event.msg) ~= "table" then err = 1 end
+
+ if err == 1 then
+ digiline_send("lcd","--Error-- | Check Train")
+ return
+ end
+
+ local i = event.msg
+ set_rc(i.ars or "")
+ atc_set_text_inside("Destination: "..(i.name or "Unknown").."\nCargo: "..(i.info or "Unknown"))
+ atc_set_text_outside(i.outside or "")
+end \ No newline at end of file