Files
QuartZ-dump/GlobalShared/Patching/PatchHelpers.cs
2024-12-29 21:15:58 +01:00

27 lines
601 B
C#

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;
}
}
}