From 50213cc26cb40c9b5c116f87a55cf73f65370ff7 Mon Sep 17 00:00:00 2001 From: autocommitter Date: Mon, 22 Apr 2024 14:54:26 +0200 Subject: State at 2021-09-21 --- durt/nodes/(1921,7,9096).lua | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'durt/nodes') 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 -- cgit v1.2.3