summaryrefslogtreecommitdiff
path: root/far/nodes/(30785,15,1711).lua
blob: ea86beb8c80cb6e86e9bf55900102950acf05f5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- 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

  F.save_train(POS( 30785,15,1711 ), "east")

  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