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