summaryrefslogtreecommitdiff
path: root/ers/nodes/(1658,1,1238).lua
diff options
context:
space:
mode:
Diffstat (limited to 'ers/nodes/(1658,1,1238).lua')
-rw-r--r--ers/nodes/(1658,1,1238).lua40
1 files changed, 40 insertions, 0 deletions
diff --git a/ers/nodes/(1658,1,1238).lua b/ers/nodes/(1658,1,1238).lua
new file mode 100644
index 0000000..c9e2edb
--- /dev/null
+++ b/ers/nodes/(1658,1,1238).lua
@@ -0,0 +1,40 @@
+-- luaatctrack_main_depot_01.lua
+local show_print = false
+if event.train then
+ if atc_arrow then
+ local passive_name = "ErsDepotTurnaround"
+ local track_route = "01 EXTRA"
+ local can_do_route1 = false
+ local can_do_route2 = false
+ local rc_list = F.get_rc_safe()
+ F.save_train()
+ F.train_duration("start")
+ F.train_info(passive_name, show_print)
+ if F.has_rc("ERSTAZIDEPOTUNLOAD", rc_list)
+ or F.has_rc("DEPOTUNLOADING", rc_list)
+ or F.has_rc("FERTRUNNER", rc_list)
+ then
+ track_route = "03 UNLOADING TRACK"
+ elseif F.has_rc("DEPOTLOADING", rc_list)
+ or F.has_rc("ERSTAZITST", rc_list)
+ then
+ track_route = "02 LOADING TRACK"
+ end
+
+ can_do_route1 = F.send_route(passive_name, track_route, show_print)
+ if can_do_route1 == false then
+ track_route = "01 EXTRA"
+ can_do_route2 = F.send_route(passive_name, track_route, show_print)
+ if can_do_route2 == false then
+ track_route = "04 EXTRA"
+ F.send_route(passive_name, track_route, show_print)
+ end
+ end
+ else
+ F.save_train()
+ local passive_name = "ErsDepotTurnaround"
+ F.train_duration("end")
+ F.train_info(passive_name, show_print)
+ end
+ return
+end \ No newline at end of file