From c136664d18732ec59b34a8e6efb962149a4ad64b83b7138347ddfbddcf88eda2 Mon Sep 17 00:00:00 2001 From: copecone Date: Thu, 21 May 2026 15:41:57 +0900 Subject: [PATCH] Fix `scrUIControllerPatch` to Patch Postfix of `scrUIController.ShowEndscreenLanterns` --- Patch/ClassPatch/scrUIControllerPatch.cs | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Patch/ClassPatch/scrUIControllerPatch.cs b/Patch/ClassPatch/scrUIControllerPatch.cs index 7d0b490..a94a248 100644 --- a/Patch/ClassPatch/scrUIControllerPatch.cs +++ b/Patch/ClassPatch/scrUIControllerPatch.cs @@ -1,4 +1,4 @@ -using HarmonyLib; +using HarmonyLib; namespace ADOFAIRenderer.Patch.ClassPatch { @@ -6,11 +6,14 @@ namespace ADOFAIRenderer.Patch.ClassPatch // ReSharper disable once InconsistentNaming public class scrUIControllerPatch { - [HarmonyPrefix] + [HarmonyPostfix] [HarmonyPatch("ShowEndscreenLanterns")] - public static bool PreventEndscreenLanterns() + public static void PreventEndscreenLanternsPostfix(scrUIController __instance) { - return !RenderMod.IsRendering; + if (RenderMod.IsRendering && __instance != null) + { + __instance.HideEndscreenLanterns(); + } } } } \ No newline at end of file