summaryrefslogtreecommitdiff
path: root/durt/nodes/(-2080,3,827).lua
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-10-28 00:00:01 +0100
committerautocommitter <autocommitter@linux-forks.de>2024-10-28 00:00:01 +0100
commit1b9809da8b7b72ae9c59dbeabbfe76a26191f1a0 (patch)
tree09a00e6632a68cbb6e4869a6213f8c44d7dab4bb /durt/nodes/(-2080,3,827).lua
parent572b186e28ddc2a630613765c0f0780b4664380f (diff)
downloadluaatc_envs-1b9809da8b7b72ae9c59dbeabbfe76a26191f1a0.tar.gz
luaatc_envs-1b9809da8b7b72ae9c59dbeabbfe76a26191f1a0.tar.bz2
luaatc_envs-1b9809da8b7b72ae9c59dbeabbfe76a26191f1a0.zip
State at 2024-10-28
Diffstat (limited to 'durt/nodes/(-2080,3,827).lua')
-rw-r--r--durt/nodes/(-2080,3,827).lua23
1 files changed, 23 insertions, 0 deletions
diff --git a/durt/nodes/(-2080,3,827).lua b/durt/nodes/(-2080,3,827).lua
new file mode 100644
index 0000000..74778f4
--- /dev/null
+++ b/durt/nodes/(-2080,3,827).lua
@@ -0,0 +1,23 @@
+if not event.train then return end --not sure why we'd need anythign else, but just in case
+if not atc_arrow then return end --not used in this case
+if not F.has_rc("ARC_LOAD") then return end --not the train for this runaround
+
+if not F.has_rc("ARC_LOAD_RUNAROUND") then --train has arrived from yard. split and runaround
+ split_off_locomotive("A0B0",1)
+ F.add_rc({
+ "ARC_LOAD_RUNAROUND", --runaround flag
+ "ARC_LOAD_HS_N",
+ "ARC_LOAD_AROUND", -- actual RC to send through runaround
+ "ARC_LOAD_HS_S",
+ "ARC_LOAD_HS_S_AC"
+ })
+else --loco has rejoined from runaround. push through to headshunt, run over loading tracks and prepare for departure
+ F.remove_rc("ARC_LOAD_AROUND")
+ F.add_rc({
+ "ARC_LOAD_HS_N",
+ "ARC_LOAD_LOADING",
+ "ARC_AUTO"
+ })
+end
+set_route(POS(-2081,4,830),"Headshunt")
+atc_send("A1S2") \ No newline at end of file