summaryrefslogtreecommitdiff
path: root/durt/nodes/(-2227,8,292).lua
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-10-15 22:37:42 +0200
committerautocommitter <autocommitter@linux-forks.de>2024-10-15 22:37:42 +0200
commit572b186e28ddc2a630613765c0f0780b4664380f (patch)
treee93412c97c577b04bbf12749bfe61470e001063a /durt/nodes/(-2227,8,292).lua
parent5c7f77725394d47ce0b907aabf885ea207a507bd (diff)
downloadluaatc_envs-master.tar.gz
luaatc_envs-master.tar.bz2
luaatc_envs-master.zip
State at 2024-10-15HEADmaster
Diffstat (limited to 'durt/nodes/(-2227,8,292).lua')
-rw-r--r--durt/nodes/(-2227,8,292).lua75
1 files changed, 0 insertions, 75 deletions
diff --git a/durt/nodes/(-2227,8,292).lua b/durt/nodes/(-2227,8,292).lua
deleted file mode 100644
index 75c39d7..0000000
--- a/durt/nodes/(-2227,8,292).lua
+++ /dev/null
@@ -1,75 +0,0 @@
---
-
-local delta = 4*60+20 -- HERE IS THE VALUE
-
-local owdata = S.BaHi_T6
-local numval = 5
-local switchbox_cp = { x=-2221,y=14,z=297}
-
-function save_delay(d)
- if not owndata then
- owndata = { false, false, false, false, false, false, false, false, }
- end
- for i=numval,2,-1 do
- owndata[i] = owndata[i-1]
- end
- owndata[1] = d
-end
-
-function delay_text()
- if not owndata then
- return ""
- end
- local rg = ""
- for i=1,numval do
- h = owndata[i]
- if not h then h = "" end
- rg = rg .. h .." "
- end
- return rg
-end
-
-if event.type == "train" then
- if atc_arrow then
- atc_send("B0WOL") -- D20OCD3S2")
--- setstate("BaHi_T5_S2","st")
--- setstate("BaHi_T5_S1","st")
-
- if not S.BaHi_T6 then
- S.BaHi_T6 = os.time()
- end
--- interrupt(1,"departure")
--- else
- now = os.time()
- tempdist = now-S.BaHi_T6
- save_delay(tempdist)
- delaystr = delay_text()
- output = "last: "..S.BaHi_T6 .. "\nnow: " .. now .. "\ndelta: " .. tempdist.. "\n"..delta .. " " .. delaystr
- digiline_send("lcd",output)
- interrupt_pos( switchbox_cp, { action = "display", data = output } )
- if tempdist > delta then
- interrupt(15,"departure")
- else
- interrupt(-tempdist+delta,"departure")
- end
--- end
- end
- return
-end
-
-if event.type == "int" then
- if event.msg == "departure" then
- -- setstate("BaHi_T5_S2","st")
- -- setstate("BaHi_T5_S1","st")
- atc_set_text_inside("S23 -> Redwood")
- atc_send("ROCD3S2")
- now = os.time()
- delaystr = delay_text()
--- digiline_send("lcd","last: \nnow: " .. now .. "\ndelta: " .. tempdist.. "\n"..delta .. " " .. delaystr)
- output = "last: " .. now .. " \n \n \n"..delta.." "..delaystr
- digiline_send("lcd",output )
- interrupt_pos( switchbox_cp, { action = "display", data = output } )
- S.BaHi_T6 = now
- end
- return
-end \ No newline at end of file