From 7b3ac07f3f9b9d92582aceb74050215a36646bc5 Mon Sep 17 00:00:00 2001 From: autocommitter Date: Mon, 22 Apr 2024 14:58:03 +0200 Subject: State at 2023-03-26 --- ers_mtn/init_code.lua | 39 +++++++++++++++++ ers_mtn/nodes/(1779,10,1235).lua | 91 +++++++++++++++++++++++++++++++++++++++ ers_mtn/nodes/(1787,3,1264).lua | 16 +++++++ ers_mtn/nodes/(1793,3,1264).lua | 16 +++++++ ers_mtn/nodes/(1793,3,1280).lua | 8 ++++ ers_mtn/nodes/(1820,15,1223).lua | 3 ++ ers_mtn/nodes/(1878,119,1237).lua | 4 ++ ers_mtn/nodes/(1896,137,1246).lua | 6 +++ 8 files changed, 183 insertions(+) create mode 100644 ers_mtn/init_code.lua create mode 100644 ers_mtn/nodes/(1779,10,1235).lua create mode 100644 ers_mtn/nodes/(1787,3,1264).lua create mode 100644 ers_mtn/nodes/(1793,3,1264).lua create mode 100644 ers_mtn/nodes/(1793,3,1280).lua create mode 100644 ers_mtn/nodes/(1820,15,1223).lua create mode 100644 ers_mtn/nodes/(1878,119,1237).lua create mode 100644 ers_mtn/nodes/(1896,137,1246).lua (limited to 'ers_mtn') diff --git a/ers_mtn/init_code.lua b/ers_mtn/init_code.lua new file mode 100644 index 0000000..6e52905 --- /dev/null +++ b/ers_mtn/init_code.lua @@ -0,0 +1,39 @@ + + +-- Gleis A +-- 1787,3,1264 + +-- Gleis B +-- 1793,3,1264 + +-- erste Brücke +-- 1820,15,1223 + + +local gleisliste = { +{ "gleisa", "Gleis A",{1787,3,1264} }, +{ "gleisb", "Gleis B", {1793,3,1264} }, +{ "erstebruecke", "erste Bruecke", {1820,15,1223 } }, +{ "kniebeuge", "Kniebeugebahnhof", { 1896, 137, 1246 } }, +} + + + + + +S.atctracks = {} + + +for _,e in ipairs(gleisliste) do + S.atctracks[e[1]] = e[2] +end + + +S.daten = {} + +S.section = {} + + +F.update = function() +return +end \ No newline at end of file diff --git a/ers_mtn/nodes/(1779,10,1235).lua b/ers_mtn/nodes/(1779,10,1235).lua new file mode 100644 index 0000000..3de7f76 --- /dev/null +++ b/ers_mtn/nodes/(1779,10,1235).lua @@ -0,0 +1,91 @@ +-- +-- +-- 1779,10,1235 + + + +local einblendung = { +{ " Bergbahn Zugpositionen", "", "", "" }, +{ "", "", "", "" }, +{ "", "", "", "" }, +{ "", "Tal:", "Gleis A/B: %-6s %-6s", "Gleis A Gleis B" }, +} + +-- ------------------------------ + + + +local function disp_update() + + for t=1,4 do + local tl = "" + for z=1,4 do + if z>1 then tl = tl.."\n" end + local h = einblendung[t][z] + if #h < 1 then h = " " end + tl = tl .. h + end + digiline_send("txt"..t,tl) + end + return +end + +-- ------------------------------ + + +if event.type == "punch" then + local text = " AUA!!!" + for i=1,4 do + digiline_send("txt"..i," "..i.."\n"..text) + end + + interrupt(10,"clear") + return +end + + +if event.type == "int" then + if event.message == "clear" then + disp_update() +-- for i=1,4 do +-- digiline_send("txt"..i,i) +-- end + end + return +end + + + + +local zeilen = {"gleisa","gleisb","tal" } + + +if event.type == "ext_int" then + local nachricht = event.message + if nachricht == nil then return end + if type(nachricht) == "string" then + if nachricht == "update" then + local t + local z + local e=1 + for t = 1,4 do + local ausgabe = "" + for z = 1,4 do + if z>1 then ausgabe = ausgabe.."\n" end + ausgabe = ausgabe .. S.daten[e] + e = e+1 + end + digiline_send("txt"..t,ausgabe) + end + return + end + return + end + if type(nachricht) == "table" then + if not nachricht.von_pos then return end + + return + end + return +end + diff --git a/ers_mtn/nodes/(1787,3,1264).lua b/ers_mtn/nodes/(1787,3,1264).lua new file mode 100644 index 0000000..aa971c6 --- /dev/null +++ b/ers_mtn/nodes/(1787,3,1264).lua @@ -0,0 +1,16 @@ +-- +-- +-- 1787,3,1264 + + +if event.type == "train" then + if atc_arrow then + S.section.gleis_a = nil + S.section.tal = event.id + else + S.section.gleis_a = event.id + S.section.tal = nil + end + F.update() + return +end \ No newline at end of file diff --git a/ers_mtn/nodes/(1793,3,1264).lua b/ers_mtn/nodes/(1793,3,1264).lua new file mode 100644 index 0000000..084819f --- /dev/null +++ b/ers_mtn/nodes/(1793,3,1264).lua @@ -0,0 +1,16 @@ +-- erstazi mountain +-- +-- 1793,3,1264 + + +if event.type == "train" then + if atc_arrow then + S.section.gleis_b = nil + S.section.tal = event.id + else + S.section.gleis_b = event.id + S.section.tal = nil + end + F.update() + return +end \ No newline at end of file diff --git a/ers_mtn/nodes/(1793,3,1280).lua b/ers_mtn/nodes/(1793,3,1280).lua new file mode 100644 index 0000000..dd48338 --- /dev/null +++ b/ers_mtn/nodes/(1793,3,1280).lua @@ -0,0 +1,8 @@ +-- +-- +-- +-- stop for trains which should not run +-- +-- 1793,3,1280 +-- +-- diff --git a/ers_mtn/nodes/(1820,15,1223).lua b/ers_mtn/nodes/(1820,15,1223).lua new file mode 100644 index 0000000..6e759ad --- /dev/null +++ b/ers_mtn/nodes/(1820,15,1223).lua @@ -0,0 +1,3 @@ +-- +-- +-- 1820,15,1223 \ No newline at end of file diff --git a/ers_mtn/nodes/(1878,119,1237).lua b/ers_mtn/nodes/(1878,119,1237).lua new file mode 100644 index 0000000..812195b --- /dev/null +++ b/ers_mtn/nodes/(1878,119,1237).lua @@ -0,0 +1,4 @@ +-- +-- +-- 1878,119,1237 +-- diff --git a/ers_mtn/nodes/(1896,137,1246).lua b/ers_mtn/nodes/(1896,137,1246).lua new file mode 100644 index 0000000..d0cf0ba --- /dev/null +++ b/ers_mtn/nodes/(1896,137,1246).lua @@ -0,0 +1,6 @@ +-- +-- +-- 1896, 137, 1246 +-- + +-- "kniebeuge", { 1896, 137, 1246 } \ No newline at end of file -- cgit v1.2.3