This commit is contained in:
/
2024-12-29 21:15:58 +01:00
commit 547655c326
77 changed files with 7313 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
using System;
using System.Reflection;
using Global.Shared.Logging;
using HarmonyLib;
namespace Global.Shared.Patching
{
public static class PatchHelpers
{
public static bool PatchAll(IPluginLogger log, Harmony harmony)
{
log.Info("Applying patches...");
try
{
harmony.PatchAll(Assembly.GetCallingAssembly());
}
catch (Exception ex)
{
log.Critical(ex, "Failed to apply patches!");
return false;
}
return true;
}
}
}