public static void patch() { if (patched || !(patched = true)) { return; } if (!HarmonyHelper.isPatchedBy(typeof(ErrorMessage).method("_AddMessage"), nameof(messagePatch))) // patching this only once { HarmonyHelper.patch(); } }
public static void unpatch() { HarmonyHelper.unpatch(typeof(ErrorMessage).method("Awake"), typeof(Patches).method(nameof(addMessages))); HarmonyHelper.unpatch(typeof(ErrorMessage).method("OnUpdate"), typeof(Patches).method(nameof(updateMessages))); }
public static void patch() { HarmonyHelper.patch(); }