From c62723cf5c8ab400d02a5772277ec37a35c6caa05b88ec1706639451662b27d3 Mon Sep 17 00:00:00 2001 From: copecone Date: Mon, 12 Oct 2026 02:03:57 +0900 Subject: [PATCH] Hide Win Texts And Detailed Results During Render --- Patch/Game/DetailedResultsPatch.cs | 25 ++++++++++++++++++++++ Patch/Game/scrControllerPatch.cs | 34 ++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) create mode 100644 Patch/Game/DetailedResultsPatch.cs diff --git a/Patch/Game/DetailedResultsPatch.cs b/Patch/Game/DetailedResultsPatch.cs new file mode 100644 index 0000000..d250ee2 --- /dev/null +++ b/Patch/Game/DetailedResultsPatch.cs @@ -0,0 +1,25 @@ +using ADOFAIRenderer.Core; +using HarmonyLib; + +namespace ADOFAIRenderer.Patch.Game; + +[HarmonyPatch(typeof(DetailedResults))] +// ReSharper disable once InconsistentNaming +public static class DetailedResultsPatch +{ + [HarmonyPrefix] + [HarmonyPatch("Show")] + // ReSharper disable once InconsistentNaming + public static bool PreventShow(DetailedResults __instance) + { + if (!RenderManager.IsActive) return true; + + if (__instance) + { + __instance.enabled = false; + if (__instance.gameObject) __instance.gameObject.SetActive(false); + } + + return false; + } +} diff --git a/Patch/Game/scrControllerPatch.cs b/Patch/Game/scrControllerPatch.cs index a12d8da..cbd98a9 100644 --- a/Patch/Game/scrControllerPatch.cs +++ b/Patch/Game/scrControllerPatch.cs @@ -41,4 +41,38 @@ public static class scrControllerPatch { return !RenderManager.IsActive; } + + [HarmonyPostfix] + [HarmonyPatch("OnLandOnPortal")] + public static void PreventWinTextsPostfix(scrController __instance) + { + if (!RenderManager.IsActive || __instance == null) return; + + if (__instance.txtCongrats) + { + __instance.txtCongrats.text = string.Empty; + __instance.txtCongrats.gameObject.SetActive(false); + } + + if (__instance.txtAprilCongrats) + { + __instance.txtAprilCongrats.text = string.Empty; + __instance.txtAprilCongrats.gameObject.SetActive(false); + } + + if (__instance.txtAllStrictClear) + { + __instance.txtAllStrictClear.text = string.Empty; + __instance.txtAllStrictClear.gameObject.SetActive(false); + } + + if (__instance.detailedResults) + { + __instance.detailedResults.enabled = false; + if (__instance.detailedResults.gameObject != null) + { + __instance.detailedResults.gameObject.SetActive(false); + } + } + } } \ No newline at end of file