summaryrefslogtreecommitdiff
path: root/durt/nodes/(-2080,3,827).lua
diff options
context:
space:
mode:
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