From e62a056686df41782705a4e0d05e88271e091b36 Mon Sep 17 00:00:00 2001 From: Kaito Kishi <17728957+TRSasasusu@users.noreply.github.com> Date: Thu, 15 Jun 2023 23:03:36 +0900 Subject: [PATCH] Fix #11 by enabling the collider after Show --- .../IssueOfTheOutsiderPatch.cs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/TranslationForTheOutsider/IssueOfTheOutsiderPatch.cs b/TranslationForTheOutsider/IssueOfTheOutsiderPatch.cs index f8156fa..9061e44 100644 --- a/TranslationForTheOutsider/IssueOfTheOutsiderPatch.cs +++ b/TranslationForTheOutsider/IssueOfTheOutsiderPatch.cs @@ -120,5 +120,19 @@ public static bool NomaiRemoteCameraStreaming_NomaiRemoteCameraPlatformIDToScene return true; } // ### End: Deal with https://github.com/TRSasasusu/TranslationForTheOutsider/issues/9 ### + + // Deal with https://github.com/TRSasasusu/TranslationForTheOutsider/issues/11 + [HarmonyPostfix] + [HarmonyPatch(typeof(NomaiWallText), nameof(NomaiWallText.Show))] + public static void NomaiWallText_Show_Postfix(NomaiWallText __instance) { + if(!TranslationForTheOutsider.Instance.IsFixIssuesOfTheOutsider) { + return; + } + + if(__instance.name == "Text_YarrowOtherSide") { + __instance.GetComponent().enabled = true; + TranslationForTheOutsider.Instance.Log($"Fixed the collider of {__instance.name}."); + } + } } }