diff --git a/Main.cs b/Main.cs index db9645b2e..0321a2409 100644 --- a/Main.cs +++ b/Main.cs @@ -948,7 +948,8 @@ public class Main : BasePlugin if (!OperatingSystem.IsAndroid()) { // there are some issues with TextBoxPatch and DiscordRPC on Android - Harmony.PatchAll(typeof(TextBoxPatch)); + if (Translator.GetUserTrueLang() is not (SupportedLangs.SChinese or SupportedLangs.TChinese or SupportedLangs.Korean)) + Harmony.PatchAll(typeof(TextBoxPatch)); Harmony.PatchAll(typeof(DiscordRPC)); } diff --git a/Patches/TextBoxPatch.cs b/Patches/TextBoxPatch.cs index d244425c2..871297899 100644 --- a/Patches/TextBoxPatch.cs +++ b/Patches/TextBoxPatch.cs @@ -21,8 +21,6 @@ public static class TextBoxPatch [HarmonyPrefix] public static bool AllowAllCharacters(TextBoxTMP __instance, [HarmonyArgument(0)] char i, ref bool __result) { - if (Translator.GetUserTrueLang() is SupportedLangs.SChinese or SupportedLangs.TChinese or SupportedLangs.Korean) return true; - if (!__instance.IpMode && i is '\'' or '"' or '’' or '`' or '-' or '–' or '—' or '‐' or '.' or ',' or ':' or ';' or '!' or '?' or '(' or ')' or '[' or ']' or '{' or '}' or '<' or '>' or '+' or '=' or '~' or '^' or '*' or '%' or '&' or '|' or '$' or '€' or '£' or '¥' or '₽' or >= '\u0100' and <= '\u024F' or >= '\u0370' and <= '\u03FF') { __result = true;