Example #1
0
            public static void patch()
            {
                if (patched || !(patched = true))
                {
                    return;
                }

                if (!HarmonyHelper.isPatchedBy(typeof(ErrorMessage).method("_AddMessage"), nameof(messagePatch)))                 // patching this only once
                {
                    HarmonyHelper.patch();
                }
            }
Example #2
0
 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)));
 }
Example #3
0
 public static void patch()
 {
     HarmonyHelper.patch();
 }