From 8145d5342d934842843b6a5db7d55a97376aa06c Mon Sep 17 00:00:00 2001 From: Eris Date: Tue, 21 Dec 2021 09:44:49 +0100 Subject: [PATCH] Disallow legacy global UnpatchAll --- IPA.Loader/Loader/HarmonyProtector.cs | 3 ++- IPA.Loader/Loader/PluginLoader.cs | 4 ---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/IPA.Loader/Loader/HarmonyProtector.cs b/IPA.Loader/Loader/HarmonyProtector.cs index 2d49fea5..8bae68bf 100644 --- a/IPA.Loader/Loader/HarmonyProtector.cs +++ b/IPA.Loader/Loader/HarmonyProtector.cs @@ -1,5 +1,4 @@ using HarmonyLib; -using System.Collections.Generic; using System.Reflection; namespace IPA.Loader @@ -17,6 +16,8 @@ namespace IPA.Loader public static void Protect(Harmony inst = null) { + HarmonyGlobalSettings.DisallowLegacyGlobalUnpatchAll = true; + selfAssem = Assembly.GetExecutingAssembly(); harmonyAssem = typeof(Harmony).Assembly; diff --git a/IPA.Loader/Loader/PluginLoader.cs b/IPA.Loader/Loader/PluginLoader.cs index 10a5eae6..f5252eee 100644 --- a/IPA.Loader/Loader/PluginLoader.cs +++ b/IPA.Loader/Loader/PluginLoader.cs @@ -11,11 +11,7 @@ using System.IO; using System.Linq; using System.Reflection; using System.Text.RegularExpressions; -using System.Threading.Tasks; -using Version = SemVer.Version; -using SemVer; using System.Diagnostics.CodeAnalysis; -using HarmonyLib; using System.Diagnostics; using IPA.AntiMalware; using Hive.Versioning;