From 715629394dc14cb6441f7df448ae6315196d6609 Mon Sep 17 00:00:00 2001 From: RMROC451 Date: Thu, 20 Jun 2024 22:10:47 -0500 Subject: [PATCH] getting a little bit of logging around set hand brakes. --- .../Patches/CarInspector_PopulateCarPanel_Patch.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/TweaksAndThings/Patches/CarInspector_PopulateCarPanel_Patch.cs b/TweaksAndThings/Patches/CarInspector_PopulateCarPanel_Patch.cs index aba4344..acb418e 100644 --- a/TweaksAndThings/Patches/CarInspector_PopulateCarPanel_Patch.cs +++ b/TweaksAndThings/Patches/CarInspector_PopulateCarPanel_Patch.cs @@ -115,9 +115,10 @@ public class CarInspector_PopulateCarPanel_Patch } else { TrainController tc = UnityEngine.Object.FindObjectOfType(); - + consist = consist.Where(c => c.DetermineFuelCar(true) != null); + Log.Information($"{car} => {mrocHelperType} => {string.Join("/", consist.Select(c => c.ToString()))}"); //when ApplyHandbrakesAsNeeded is called, and the consist contains an engine, it stops applying brakes. - tc.ApplyHandbrakesAsNeeded(consist.Where(c => c.DetermineFuelCar(true) != null).ToList(), PlaceTrainHandbrakes.Automatic); + tc.ApplyHandbrakesAsNeeded(consist.ToList(), PlaceTrainHandbrakes.Automatic); } break;