You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

33 lines
959 B

using HarmonyLib;
using System;
namespace IPA.Injector
{
internal static class AntiYeetPatch
{
private static Harmony instance;
public static void Apply()
{
#if BeatSaber
Logging.Logger.Injector.Info("Applying anti-yeet patch");
try
{
instance = new Harmony("BSIPA Anti-Yeet");
var original = AccessTools.Method("IPAPluginsDirDeleter:Awake");
var prefix = new HarmonyMethod(AccessTools.Method(typeof(AntiYeetPatch), nameof(SuppressIPAPluginsDirDeleter)));
instance.Patch(original, prefix);
}
catch (Exception e)
{
Logging.Logger.Injector.Warn("Could not apply anti-yeet patch");
Logging.Logger.Injector.Warn(e);
}
#endif
}
private static bool SuppressIPAPluginsDirDeleter() => false;
}
}