summaryrefslogtreecommitdiff
path: root/auto_yards/init_code.lua
diff options
context:
space:
mode:
Diffstat (limited to 'auto_yards/init_code.lua')
-rw-r--r--auto_yards/init_code.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/auto_yards/init_code.lua b/auto_yards/init_code.lua
index ebab6e2..7c37bc1 100644
--- a/auto_yards/init_code.lua
+++ b/auto_yards/init_code.lua
@@ -166,6 +166,8 @@ F.yard_arrival = function(yard_id,this_dir) -- arrow points towards yard
end
atc_set_ars_disable(false)
atc_send("S6")
+
+ print(rwt.to_string(rwt.now()))
print("YARD: "..yard_id..": Train "..atc_id.." enters from the "..tostring(this_dir).." direction and "..((rts and "will") or "won't").." return in the same direction")
print("YARD: "..yard_id..": Length "..train_length())
return
@@ -180,6 +182,7 @@ F.yard_arrival = function(yard_id,this_dir) -- arrow points towards yard
if event.train and atc_arrow then
if F.indicator(yard.active_indicator_pos) then
+ print(rwt.to_string(rwt.now()))
print("YARD: "..yard_id..": Train "..atc_id.." has arrived and has to wait for the yard to deactivate.")
schedule_in(";10","recheck")
return
@@ -286,6 +289,7 @@ F.headshunt_yard = function(yard_id,this_dir) -- arrow points toward yard
schedule_in(";01",atc_id)
return
else
+ print(rwt.to_string(rwt.now()))
print("Preparing train "..atc_id.." to depart "..yard_id.." yard.")
if get_line() ~= "LHF" then -- LHF trains will always only collect the * lane for that direction. This code is for other trains
local collect = F.get_rc_safe():match(yard_id.."_COLLECT_(%S+)") -- will only match to the first _COLLECT RC to avoid excessively long trains in the headshunt
@@ -350,6 +354,7 @@ F.headshunt_exit = function(yard_id,this_dir) -- arrow points out of yard
if event.train then
if atc_arrow and (F.indicator(yard.dir_indicator_pos) == this_dir) then
if F.has_rc(yard_id.."_DEPART") then
+ print(rwt.to_string(rwt.now()))
print("YARD: "..yard_id..": Train "..atc_id.." has a length of "..train_length())
print("YARD: "..yard_id..": It will depart in the "..tostring(this_dir).." direction.")
unset_autocouple()
@@ -384,6 +389,7 @@ F.headshunt_exit = function(yard_id,this_dir) -- arrow points out of yard
if event.msg == "deactivate_check" then
if not atc_id then
F.indicator(yard.active_indicator_pos,false)
+ print(rwt.to_string(rwt.now()))
print(yard_id.." yard Disabled")
else
schedule_in(";05","deactivate_check")