diff --git a/TweaksAndThings/Patches/TagController_UpdateTag_Patch.cs b/TweaksAndThings/Patches/TagController_UpdateTag_Patch.cs index 825f595..a9acf17 100644 --- a/TweaksAndThings/Patches/TagController_UpdateTag_Patch.cs +++ b/TweaksAndThings/Patches/TagController_UpdateTag_Patch.cs @@ -3,9 +3,7 @@ using Model; using Model.OpsNew; using Railloader; using RMROC451.TweaksAndThings.Extensions; -using UI; using UI.Tags; -using UnityEngine; namespace RMROC451.TweaksAndThings.Patches; @@ -19,7 +17,6 @@ internal class TagController_UpdateTag_Patch private static void Postfix(Car car, TagCallout tagCallout) { - TagController tagController = UnityEngine.Object.FindObjectOfType(); TweaksAndThingsPlugin tweaksAndThings = SingletonPluginBase.Shared; if (!tweaksAndThings.IsEnabled || !tweaksAndThings.settings.HandBrakeAndAirTagModifiers) @@ -27,24 +24,14 @@ internal class TagController_UpdateTag_Patch return; } - ProceedWithPostFix(car, tagCallout, tagController); + ProceedWithPostFix(car, tagCallout); return; } - private static void ProceedWithPostFix(Car car, TagCallout tagCallout, TagController tagController) + private static void ProceedWithPostFix(Car car, TagCallout tagCallout) { - bool isAltDownWithCarIssue = GameInput.IsAltDown && car.CarOrEndGearIssue(); tagCallout.callout.Title = string.Format(tagTitleFormat, "{0}", car.DisplayName); - tagCallout.gameObject.SetActive( - tagCallout.gameObject.activeSelf && - (!GameInput.IsAltDown || isAltDownWithCarIssue) - ); - - if (tagCallout.gameObject.activeSelf && isAltDownWithCarIssue) - { - tagController.ApplyImageColor(tagCallout, Color.black); - } tagCallout.callout.Title = (car.CarAndEndGearIssue(), car.EndAirSystemIssue(), car.HandbrakeApplied()) switch