diff options
author | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:57:49 +0200 |
---|---|---|
committer | autocommitter <autocommitter@linux-forks.de> | 2024-04-22 14:57:49 +0200 |
commit | b48d879c279b5f1ee1b6fe6dc392ba77708de173 (patch) | |
tree | 21f5de44bda0f50bcf16d7aeaf30582c56a3f45c /auto_yards | |
parent | 68dd87842504e16bd25b33500b80f7c0d3e4f7f0 (diff) | |
download | luaatc_envs-b48d879c279b5f1ee1b6fe6dc392ba77708de173.tar.gz luaatc_envs-b48d879c279b5f1ee1b6fe6dc392ba77708de173.tar.bz2 luaatc_envs-b48d879c279b5f1ee1b6fe6dc392ba77708de173.zip |
State at 2022-06-27
Diffstat (limited to 'auto_yards')
-rw-r--r-- | auto_yards/init_code.lua | 6 |
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") |