Exemple #1
0
 internal static void RemoveHarmonyPatches()
 {
     try
     {
         // Removes all patches with this HarmonyId
         //harmony.UnpatchAll(HarmonyId);
         harmony.UnpatchSelf();
     }
     catch (Exception ex)
     {
         Plugin.Log?.Error("Error removing Harmony patches: " + ex.Message);
         Plugin.Log?.Debug(ex);
     }
 }
Exemple #2
0
        internal static void Quit()
        {
            MelonHandler.OnApplicationQuit();
            MelonPreferences.Save();

            HarmonyInstance.UnpatchSelf();
            bHaptics.Quit();

            MelonLogger.Flush();

            if (MelonLaunchOptions.Core.QuitFix)
            {
                Process.GetCurrentProcess().Kill();
            }
        }
Exemple #3
0
 public void OnDisable() => Harmony.UnpatchSelf();