summaryrefslogtreecommitdiff
path: root/Tyard/nodes/(-4043,12,-2655).lua
diff options
context:
space:
mode:
authorautocommitter <autocommitter@linux-forks.de>2024-04-22 14:57:00 +0200
committerautocommitter <autocommitter@linux-forks.de>2024-04-22 14:57:00 +0200
commit10f12bff0f9191133e8c10c1754c5642e9b1f5b8 (patch)
tree723c0812b04a4a03626204369cd750c9c79c89f3 /Tyard/nodes/(-4043,12,-2655).lua
parent7ce1ee32c9dd199eef6212c4f601ac4aaf3ce400 (diff)
downloadluaatc_envs-10f12bff0f9191133e8c10c1754c5642e9b1f5b8.tar.gz
luaatc_envs-10f12bff0f9191133e8c10c1754c5642e9b1f5b8.tar.bz2
luaatc_envs-10f12bff0f9191133e8c10c1754c5642e9b1f5b8.zip
State at 2022-04-22
Diffstat (limited to 'Tyard/nodes/(-4043,12,-2655).lua')
-rw-r--r--Tyard/nodes/(-4043,12,-2655).lua32
1 files changed, 1 insertions, 31 deletions
diff --git a/Tyard/nodes/(-4043,12,-2655).lua b/Tyard/nodes/(-4043,12,-2655).lua
index 91291bf..747fb3d 100644
--- a/Tyard/nodes/(-4043,12,-2655).lua
+++ b/Tyard/nodes/(-4043,12,-2655).lua
@@ -1,31 +1 @@
---EOL code
-local this_dir = true -- true = F.dir arrow points north
-
-if F.yard_active() then
- if atc_arrow then
- if F.dir() == this_dir then --train has bounced and needs to leave the rake or depart with it
- if F.has_rc("TY_FINAL_COLLECT") then -- take the whole rake to the exit
- F.remove({"TY_FINAL_COLLECT")
- F.add_rc({"TY_DEPART"})
- else -- disconnect loco and return to pickup
- split_off_locomotive("A0B0")
- F.add_rc({"TY_PICKUP"})
- end
- F.add_rc({"TY_HEADSHUNT"})
- else --train needs to bounce
- atc_send("B0WRD1S4")
- end
- else
- if F.dir() == this_dir then
- --train is clasifying wagons, let it pass and couple to the rest of the rake
- local rm = {}
- for v in F.get_rc_safe():gmatch("(TY_CLASS_%S+)") do
- table.insert(rm,v)
- end
- F.remove_rc(rm)
- else --this should never come into play as it means the train has entered from the wrong end somehow
- atc_send("BBOL") --stop the train and open the doors (if available) to signify assistance required
- F.error(true)
- end
- end
-end \ No newline at end of file
+F.EOL(true) \ No newline at end of file