diff --git a/SiraUtil/Tweaks/RemoveLocalizationLog.cs b/SiraUtil/Tweaks/RemoveLocalizationLog.cs deleted file mode 100644 index 869391a..0000000 --- a/SiraUtil/Tweaks/RemoveLocalizationLog.cs +++ /dev/null @@ -1,36 +0,0 @@ -using HarmonyLib; -using Polyglot; -using SiraUtil.Extras; -using System.Collections.Generic; -using System.Linq; -using System.Reflection.Emit; - -namespace SiraUtil.Tweaks -{ - [HarmonyPatch(typeof(LocalizationImporter), "ImportTextFile")] - internal static class RemoveLocalizationLog - { - private static readonly List _logOpCodes = new() - { - OpCodes.Ldstr, - OpCodes.Ldloc_S, - OpCodes.Ldstr, - OpCodes.Call, - OpCodes.Call - }; - - internal static IEnumerable Transpiler(IEnumerable instructions) - { - var codes = instructions.ToList(); - for (int i = 0; i < codes.Count; i++) - { - if (Utilities.OpCodeSequence(codes, _logOpCodes, i)) - { - codes.RemoveRange(i, _logOpCodes.Count); - break; - } - } - return codes.AsEnumerable(); - } - } -} \ No newline at end of file diff --git a/SiraUtil/Tweaks/RemoveLocalizationWarningLog.cs b/SiraUtil/Tweaks/RemoveLocalizationWarningLog.cs deleted file mode 100644 index 6ecbb8a..0000000 --- a/SiraUtil/Tweaks/RemoveLocalizationWarningLog.cs +++ /dev/null @@ -1,18 +0,0 @@ -using HarmonyLib; -using System; -using System.Linq; -using UnityEngine; - -namespace SiraUtil.Tweaks -{ - [HarmonyPatch(typeof(Debug), "LogWarning", argumentTypes: new Type[] { typeof(object) })] - internal static class RemoveLocalizationWarningLog - { - private static readonly bool _contains = Environment.GetCommandLineArgs().Contains("--siralog"); - - internal static bool Prefix(ref object message) - { - return !message.ToString().StartsWith("Could not find key") || _contains; - } - } -} \ No newline at end of file