diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:52:21 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:52:21 +0200 |
commit | ddaee135d42ede8b4970f2c2cce973f5c03234f1 (patch) | |
tree | f14d2a66f18808b4414dbf4aaff5d48b1e4017bb /auto_yards | |
parent | 5f72b7ec62a6f2fb8ce6b9d5379f03a3e4126971 (diff) | |
download | luaatc_envs-ddaee135d42ede8b4970f2c2cce973f5c03234f1.tar.gz luaatc_envs-ddaee135d42ede8b4970f2c2cce973f5c03234f1.tar.bz2 luaatc_envs-ddaee135d42ede8b4970f2c2cce973f5c03234f1.zip |
State at 2020-09-28
Diffstat (limited to 'auto_yards')
-rw-r--r-- | auto_yards/init_code.lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1902,10,-893).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1909,10,-930).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1909,10,-957).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1909,7,-1017).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1912,10,-928).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1912,10,-957).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1912,7,-1017).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1915,10,-957).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1915,7,-1017).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1918,10,-957).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1918,7,-1017).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1932,3,-1053).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1933,3,-1050).lua | 1 | ||||
-rw-r--r-- | auto_yards/nodes/(-1982,3,-1079).lua | 1 |
15 files changed, 15 insertions, 0 deletions
diff --git a/auto_yards/init_code.lua b/auto_yards/init_code.lua new file mode 100644 index 0000000..fc73c3a --- /dev/null +++ b/auto_yards/init_code.lua @@ -0,0 +1 @@ +F.pickup = function(yard,dir,lane)
local y = yard
if S[y].yard_active then
if atc_arrow then
if S[y].dir == dir then
set_route(yard..dir.."_"..lane, "HEADSHUNT")
local plen = train_length()
local rc = split_at_fc("B0")
local trc = yard..dir.."_"..rc
if plen == train_length() and (rc == "" or S[y].rc:match(trc)) then
S[y].exiting = true
end
if rc and rc ~= "" then
set_rc(yard..dir.."_"..rc)
else
set_rc(S[y].rc)
S[y].exiting = true
end
else -- if S[y].dir ~= dir
if S[y].RTS then -- loop around to other HS
S[y].RTS = nil
set_route(yard..dir.."_"..lane,"AROUND")
split_off_locomotive("B0")
set_rc("AROUND_"..S[y].dir)
return
else
atc_send("B0WRS4")
end
end
end -- nothing to do if train goes against arrow
end
end
F.EOL = function(yard,dir,lane)
local y = yard
if S[y].yard_active then
if S[y].dir == dir then
if atc_arrow then
if not S[y].exiting then
--return to PICKUP via headshunt
split_off_locomotive("B0")
set_rc("PICKUP")
set_route(yard..dir.."_"..lane, "HEADSHUNT")
else
--if S[y].exiting then loco has already sorted to correct lane for departure
--S[y].exiting set by the pickup track
set_rc(S[y].rc)
set_route(yard..dir.."_"..lane, "EXIT")
S[y].exiting = nil
end
end
else -- EOL Bounce
atc_send("B0WD1RS4")
end
end
end
\ No newline at end of file diff --git a/auto_yards/nodes/(-1902,10,-893).lua b/auto_yards/nodes/(-1902,10,-893).lua new file mode 100644 index 0000000..a878623 --- /dev/null +++ b/auto_yards/nodes/(-1902,10,-893).lua @@ -0,0 +1 @@ +--EXIT
\ No newline at end of file diff --git a/auto_yards/nodes/(-1909,10,-930).lua b/auto_yards/nodes/(-1909,10,-930).lua new file mode 100644 index 0000000..90ea19a --- /dev/null +++ b/auto_yards/nodes/(-1909,10,-930).lua @@ -0,0 +1 @@ +-- HEADSHUNT and EXIT
\ No newline at end of file diff --git a/auto_yards/nodes/(-1909,10,-957).lua b/auto_yards/nodes/(-1909,10,-957).lua new file mode 100644 index 0000000..3774070 --- /dev/null +++ b/auto_yards/nodes/(-1909,10,-957).lua @@ -0,0 +1 @@ +F.pickup("BY","N","0")
\ No newline at end of file diff --git a/auto_yards/nodes/(-1909,7,-1017).lua b/auto_yards/nodes/(-1909,7,-1017).lua new file mode 100644 index 0000000..b78dee7 --- /dev/null +++ b/auto_yards/nodes/(-1909,7,-1017).lua @@ -0,0 +1 @@ +F.pickup("BY","S","0")
\ No newline at end of file diff --git a/auto_yards/nodes/(-1912,10,-928).lua b/auto_yards/nodes/(-1912,10,-928).lua new file mode 100644 index 0000000..afbdcef --- /dev/null +++ b/auto_yards/nodes/(-1912,10,-928).lua @@ -0,0 +1 @@ +-- ENTRY and WAITING
\ No newline at end of file diff --git a/auto_yards/nodes/(-1912,10,-957).lua b/auto_yards/nodes/(-1912,10,-957).lua new file mode 100644 index 0000000..68f24bb --- /dev/null +++ b/auto_yards/nodes/(-1912,10,-957).lua @@ -0,0 +1 @@ +F.EOL("BY","N","1")
\ No newline at end of file diff --git a/auto_yards/nodes/(-1912,7,-1017).lua b/auto_yards/nodes/(-1912,7,-1017).lua new file mode 100644 index 0000000..572ed50 --- /dev/null +++ b/auto_yards/nodes/(-1912,7,-1017).lua @@ -0,0 +1 @@ +F.EOL("BY","S","1")
\ No newline at end of file diff --git a/auto_yards/nodes/(-1915,10,-957).lua b/auto_yards/nodes/(-1915,10,-957).lua new file mode 100644 index 0000000..40a85b3 --- /dev/null +++ b/auto_yards/nodes/(-1915,10,-957).lua @@ -0,0 +1 @@ +F.EOL("BY","N","2")
\ No newline at end of file diff --git a/auto_yards/nodes/(-1915,7,-1017).lua b/auto_yards/nodes/(-1915,7,-1017).lua new file mode 100644 index 0000000..217f0f4 --- /dev/null +++ b/auto_yards/nodes/(-1915,7,-1017).lua @@ -0,0 +1 @@ +F.EOL("BY","S","2")
\ No newline at end of file diff --git a/auto_yards/nodes/(-1918,10,-957).lua b/auto_yards/nodes/(-1918,10,-957).lua new file mode 100644 index 0000000..f4f335b --- /dev/null +++ b/auto_yards/nodes/(-1918,10,-957).lua @@ -0,0 +1 @@ +F.EOL("BY","N","3")
\ No newline at end of file diff --git a/auto_yards/nodes/(-1918,7,-1017).lua b/auto_yards/nodes/(-1918,7,-1017).lua new file mode 100644 index 0000000..6c9c7d1 --- /dev/null +++ b/auto_yards/nodes/(-1918,7,-1017).lua @@ -0,0 +1 @@ +F.EOL("BY","S","3")
\ No newline at end of file diff --git a/auto_yards/nodes/(-1932,3,-1053).lua b/auto_yards/nodes/(-1932,3,-1053).lua new file mode 100644 index 0000000..2970f21 --- /dev/null +++ b/auto_yards/nodes/(-1932,3,-1053).lua @@ -0,0 +1 @@ +--HEADSHUNT and EXIT
\ No newline at end of file diff --git a/auto_yards/nodes/(-1933,3,-1050).lua b/auto_yards/nodes/(-1933,3,-1050).lua new file mode 100644 index 0000000..afbdcef --- /dev/null +++ b/auto_yards/nodes/(-1933,3,-1050).lua @@ -0,0 +1 @@ +-- ENTRY and WAITING
\ No newline at end of file diff --git a/auto_yards/nodes/(-1982,3,-1079).lua b/auto_yards/nodes/(-1982,3,-1079).lua new file mode 100644 index 0000000..a878623 --- /dev/null +++ b/auto_yards/nodes/(-1982,3,-1079).lua @@ -0,0 +1 @@ +--EXIT
\ No newline at end of file |