Exemplo n.º 1
0
            public static void Postfix(TextTranslatorTMP __instance)
            {
                if (!IsEnabled.Value)
                {
                    return;
                }

                var textMeshPro = __instance.GetComponent <TextMeshPro>();

                textMeshPro.text = UwUifier.Convert(textMeshPro.text);
                textMeshPro.ForceMeshUpdate(true, true);
            }
Exemplo n.º 2
0
        public override void Load()
        {
            ConfigureConfig();

            SpritePatches.Patch();
            InterfacePatches.Patch();

            ReactorVersionShower.TextUpdated += text =>
            {
                text.text = UwUifier.Convert(text.text);
            };

            Harmony.PatchAll();
        }
Exemplo n.º 3
0
                public static void Postfix(TextMeshPro __instance)
                {
                    if (!__instance || !IsEnabled.Value)
                    {
                        return;
                    }

                    if (IgnoredObjects.Contains(__instance.gameObject.name) ||
                        __instance.transform.parent &&
                        IgnoredObjects.Contains(__instance.transform.parent.name))
                    {
                        return;
                    }

                    var textTranslator = __instance.gameObject.GetComponent <TextTranslatorTMP>();

                    if (textTranslator && textTranslator.isActiveAndEnabled)
                    {
                        return;
                    }

                    __instance.text = UwUifier.Convert(__instance.GetParsedText());
                    __instance.ForceMeshUpdate(true, true);
                }