blob: 06bdb5c1164a887ca7d471f34b635a7b6acbe04f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
-- far_luaatctrack_findopenroute_01.lua
local signal_pos = "FareastEndEntrySignal"
local last_route = "3"
local proposed_route_name = ""
if event.type == "train" then
if not atc_id then return end
if atc_arrow then
atc_send("B0")
end
for i = 1, last_route, 1 do
l = tostring(i)
proposed_route_name = "Far East End (Platform " .. l .. ")"
if can_set_route(signal_pos, proposed_route_name) then
set_route(signal_pos, proposed_route_name)
F.print("Train ID " .. atc_id .. " going on " .. proposed_route_name)
atc_send("SM")
end
end
end
|