Example #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);
     }
 }
Example #2
0
        internal static void Quit()
        {
            MelonHandler.OnApplicationQuit();
            MelonPreferences.Save();

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

            MelonLogger.Flush();

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