diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:52:14 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:52:14 +0200 |
commit | 5f72b7ec62a6f2fb8ce6b9d5379f03a3e4126971 (patch) | |
tree | 85f5c29c1dde0bedb823aa60a48015312670396a /Hyard/nodes/(-2594,12,-1780).lua | |
parent | c21692e0a830e434675014dd7b54736d180ce71d (diff) | |
download | luaatc_envs-5f72b7ec62a6f2fb8ce6b9d5379f03a3e4126971.tar.gz luaatc_envs-5f72b7ec62a6f2fb8ce6b9d5379f03a3e4126971.tar.bz2 luaatc_envs-5f72b7ec62a6f2fb8ce6b9d5379f03a3e4126971.zip |
State at 2020-08-29
Diffstat (limited to 'Hyard/nodes/(-2594,12,-1780).lua')
-rw-r--r-- | Hyard/nodes/(-2594,12,-1780).lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Hyard/nodes/(-2594,12,-1780).lua b/Hyard/nodes/(-2594,12,-1780).lua new file mode 100644 index 0000000..7a257db --- /dev/null +++ b/Hyard/nodes/(-2594,12,-1780).lua @@ -0,0 +1,28 @@ + +local dir = 1 +local lane = 6 +if S.dir == dir and atc_arrow then + set_route("HYD"..lane, "HEADSHUNT1") + local plen = train_length() + local rc = split_at_fc("B0") + local trc = "HY"..rc..dir + S.cars = plen - train_length() + if plen == train_length() and (rc == "" or S.rc:match(trc)) and not (S.rc:match("HYREVERSE")) then + S.exiting = true + end + if rc and rc ~= "" then + set_rc("HY"..rc..dir) + else + set_rc(S.rc) + S.exiting = true + end +elseif S.dir == 2 and atc_arrow then +if S.rc:match("HYREVERSE") and S.cars == 0 then + set_route("HYD"..lane, "HEADSHUNT1") +S.reversing = true +S.dir = 1 +end +if not S.reversing then +atc_send("B0WD1RS4") +end +end
\ No newline at end of file |