diff options
-rw-r--r-- | Tyard/nodes/(-3967,12,-2646).lua | 12 | ||||
-rw-r--r-- | Tyard/nodes/(-4011,12,-2642).lua | 3 | ||||
-rw-r--r-- | Tyard/nodes/(-4027,12,-2655).lua | 2 | ||||
-rw-r--r-- | Tyard/nodes/(-4027,12,-2731).lua | 2 | ||||
-rw-r--r-- | Tyard/nodes/(-4100,12,-2745).lua | 3 | ||||
-rw-r--r-- | Tyard/nodes/(-4167,12,-2742).lua | 13 |
6 files changed, 23 insertions, 12 deletions
diff --git a/Tyard/nodes/(-3967,12,-2646).lua b/Tyard/nodes/(-3967,12,-2646).lua index 06da983..48f7b9f 100644 --- a/Tyard/nodes/(-3967,12,-2646).lua +++ b/Tyard/nodes/(-3967,12,-2646).lua @@ -1,5 +1,4 @@ -- Headshunt Exit Controller -local exit_signal = POS(-4178,15,-2742) --customise to yard specs if not F.yard_active() then return end __approach_callback_mode = 1 if event.approach and not event.has_entered then @@ -12,12 +11,14 @@ if event.train then if atc_arrow then if F.has_rc("TY_DEPART") then print("Train departs yard to mainline at full speed") - - F.remove_rc({"TY_DEPART"}) + unset_autocouple() + F.remove_rc({"TY_FINAL_COLLECT","TY_DEPART"}) + F.remove_rc_match("TY_LOCOS_%d+") + F.remove_rc_match("TY_WAGONS_%d+") atc_set_ars_disable(false) - -- set_route(exit_signal,"Exit Yard") + set_route(exit_signal,"Exit Yard") atc_send("S6D10SM") - -- schedule_in(";05","deactivate_check") + schedule_in(";05","deactivate_check") -- wait a little to ensure train is clear from headshunt to deactivate yard print(F.get_rc_safe()) return end @@ -31,6 +32,7 @@ if event.schedule then if event.msg == "deactivate_check" then if not atc_id then F.yard_active(false) + print("Yard Disabled") else schedule_in(";05","deactivate_check") return diff --git a/Tyard/nodes/(-4011,12,-2642).lua b/Tyard/nodes/(-4011,12,-2642).lua index 6c9932d..2498bc5 100644 --- a/Tyard/nodes/(-4011,12,-2642).lua +++ b/Tyard/nodes/(-4011,12,-2642).lua @@ -1,5 +1,8 @@ -- Yard arrival checker -- F.dir = true if entering from south + +if F.has_rc("TY_NOSHUNT") then return end + local function enter_yard() F.dir(false) F.yard_active(true) diff --git a/Tyard/nodes/(-4027,12,-2655).lua b/Tyard/nodes/(-4027,12,-2655).lua index b7ed9c7..c7a71f4 100644 --- a/Tyard/nodes/(-4027,12,-2655).lua +++ b/Tyard/nodes/(-4027,12,-2655).lua @@ -31,7 +31,7 @@ if F.yard_active() then end if this_dir == F.dir() then --train has bounced and is ready to classify wagon(s) -- local pre_split = train_length() - local lane = split_at_fc("A0B0",3) -- where to classify this rake + local lane = split_at_fc("A0B0",5) -- where to classify this rake local locos = tonumber(F.get_rc_safe():match("TY_LOCOS_(%d+)")) or 1 --saved loco count local wagons = tonumber(F.get_rc_safe():match("TY_WAGONS_(%d+)")) or 0 -- wagon_count from last classification split local this_rake = train_length() - locos-- subtract these wagons from the overall wagon count diff --git a/Tyard/nodes/(-4027,12,-2731).lua b/Tyard/nodes/(-4027,12,-2731).lua index 836ebf8..91a7249 100644 --- a/Tyard/nodes/(-4027,12,-2731).lua +++ b/Tyard/nodes/(-4027,12,-2731).lua @@ -31,7 +31,7 @@ if F.yard_active() then end if this_dir == F.dir() then --train has bounced and is ready to classify wagon(s) -- local pre_split = train_length() - local lane = split_at_fc("A0B0",3) -- where to classify this rake + local lane = split_at_fc("A0B0",5) -- where to classify this rake local locos = tonumber(F.get_rc_safe():match("TY_LOCOS_(%d+)")) or 1 --saved loco count local wagons = tonumber(F.get_rc_safe():match("TY_WAGONS_(%d+)")) or 0 -- wagon_count from last classification split local this_rake = train_length() - locos-- subtract these wagons from the overall wagon count diff --git a/Tyard/nodes/(-4100,12,-2745).lua b/Tyard/nodes/(-4100,12,-2745).lua index bd4ff7e..7f6b3e5 100644 --- a/Tyard/nodes/(-4100,12,-2745).lua +++ b/Tyard/nodes/(-4100,12,-2745).lua @@ -1,5 +1,8 @@ -- Yard arrival checker -- F.dir = true if entering from south + +if F.has_rc("TY_NOSHUNT") then return end + local function enter_yard() F.dir(true) F.yard_active(true) diff --git a/Tyard/nodes/(-4167,12,-2742).lua b/Tyard/nodes/(-4167,12,-2742).lua index 06da983..fe1b446 100644 --- a/Tyard/nodes/(-4167,12,-2742).lua +++ b/Tyard/nodes/(-4167,12,-2742).lua @@ -1,6 +1,6 @@ -- Headshunt Exit Controller -local exit_signal = POS(-4178,15,-2742) --customise to yard specs if not F.yard_active() then return end +local exit_signal = POS(-4178,15,-2742) __approach_callback_mode = 1 if event.approach and not event.has_entered then atc_set_ars_disable(true) @@ -12,12 +12,14 @@ if event.train then if atc_arrow then if F.has_rc("TY_DEPART") then print("Train departs yard to mainline at full speed") - - F.remove_rc({"TY_DEPART"}) + unset_autocouple() + F.remove_rc({"TY_FINAL_COLLECT","TY_DEPART"}) + F.remove_rc_match("TY_LOCOS_%d+") + F.remove_rc_match("TY_WAGONS_%d+") atc_set_ars_disable(false) - -- set_route(exit_signal,"Exit Yard") + set_route(exit_signal,"Exit Yard") atc_send("S6D10SM") - -- schedule_in(";05","deactivate_check") + schedule_in(";05","deactivate_check") -- wait a little to ensure train is clear from headshunt to deactivate yard print(F.get_rc_safe()) return end @@ -31,6 +33,7 @@ if event.schedule then if event.msg == "deactivate_check" then if not atc_id then F.yard_active(false) + print("Yard Disabled") else schedule_in(";05","deactivate_check") return |