summaryrefslogtreecommitdiff
path: root/ers/nodes/(1655,1,1261).lua
blob: 2d9ef7a032b3fab05faad0325d0f6a47baf33901 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- luaatctrack_main_depot_01.lua
local show_print = false
if event.train then
  if atc_arrow then
    local passive_name = "ErsDepotTurnaround"
    local track_route = ""
    local can_do_route = false
    F.train_duration("start")
    F.train_info(passive_name, show_print)

    if F.does_train_have_rc("ERSTAZIDEPOTUNLOAD") then
      track_route = "01 UNLOADING TRACK"
      F.send_route(passive_name, track_route, show_print)
    elseif F.does_train_have_rc("ERSTAZITST") then
      track_route = "02 LOADING TRACK"
      F.send_route(passive_name, track_route, show_print)
    else
      track_route = "03 EXTRA"
      can_do_route = F.send_route(passive_name, track_route, show_print)
      if can_do_route == false then
        track_route = "04 EXTRA"
        F.send_route(passive_name, track_route, show_print)
      end
    end
  else
    local passive_name = "ErsDepotTurnaround"
    F.train_duration("end")
    F.train_info(passive_name, show_print)
  end
end