From b9f11dbca070be578f74a16a7e73c8071c3c41b7 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Thu, 16 Mar 2023 23:35:05 -0500 Subject: [PATCH] update if QM is open --- FuckMetrics/HarmonyPatches.cs | 13 +++++++++++++ FuckMetrics/Properties/AssemblyInfo.cs | 2 +- FuckMetrics/format.json | 6 +++--- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/FuckMetrics/HarmonyPatches.cs b/FuckMetrics/HarmonyPatches.cs index 6b91273..1918f1d 100644 --- a/FuckMetrics/HarmonyPatches.cs +++ b/FuckMetrics/HarmonyPatches.cs @@ -87,4 +87,17 @@ public static class CohtmlViewPatches _gameMenuOpenTraverse = Traverse.Create(__instance).Field("_gameMenuOpen"); SchedulerSystem.AddJob(new SchedulerSystem.Job(() => FuckMetrics.CohtmlAdvanceView(_gameMenuView, _gameMenuOpenTraverse)), 12f, 6f, -1); } + + [HarmonyPostfix] + [HarmonyPatch(typeof(ViewManager), "OnMicrophoneStatusSwitched")] + private static void Postfix_ViewManager_OnMicrophoneStatusSwitched() + { + if (_quickMenuOpenTraverse.GetValue()) + { + if (FuckMetricsMod.EntryDisableMetrics.Value != FuckMetricsMod.SettingState.Always) + { + CVR_MenuManager.Instance.SendCoreUpdate(); + } + } + } } \ No newline at end of file diff --git a/FuckMetrics/Properties/AssemblyInfo.cs b/FuckMetrics/Properties/AssemblyInfo.cs index e77d921..fb85d2c 100644 --- a/FuckMetrics/Properties/AssemblyInfo.cs +++ b/FuckMetrics/Properties/AssemblyInfo.cs @@ -26,6 +26,6 @@ using System.Reflection; namespace NAK.Melons.FuckMetrics.Properties; internal static class AssemblyInfoParams { - public const string Version = "1.0.2"; + public const string Version = "1.0.3"; public const string Author = "NotAKidoS"; } \ No newline at end of file diff --git a/FuckMetrics/format.json b/FuckMetrics/format.json index e5b314b..c42c743 100644 --- a/FuckMetrics/format.json +++ b/FuckMetrics/format.json @@ -1,7 +1,7 @@ { "_id": 135, "name": "FuckMetrics", - "modversion": "1.0.2", + "modversion": "1.0.3", "gameversion": "2022r170", "loaderversion": "0.5.7", "modtype": "Mod", @@ -17,8 +17,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidOnSteam/FuckMetrics/releases/download/v1.0.2/FuckMetrics.dll", + "downloadlink": "https://github.com/NotAKidOnSteam/FuckMetrics/releases/download/v1.0.3/FuckMetrics.dll", "sourcelink": "https://github.com/NotAKidOnSteam/FuckMetrics/", - "changelog": "- Initial Release.\n- Renamed to FuckMetrics.\n- Add Update Rate settings.\n- Add back CohtmlView disabling as option.", + "changelog": "- Initial Release.\n- Renamed to FuckMetrics.\n- Add Update Rate settings.\n- Add back CohtmlView disabling as option.\n- Update CoreUpdate on mic toggle if QM is open.", "embedcolor": "#8ed6fb" } \ No newline at end of file