diff --git a/MiraAPI/Patches/HudManagerPatches.cs b/MiraAPI/Patches/HudManagerPatches.cs index 3076505..32b05b8 100644 --- a/MiraAPI/Patches/HudManagerPatches.cs +++ b/MiraAPI/Patches/HudManagerPatches.cs @@ -59,7 +59,8 @@ namespace MiraAPI.Patches /* /// /// Trigger hudstart on current custom gamemode /// - [HarmonyPostfix, HarmonyPatch("OnGameStart")] + [HarmonyPostfix] + [HarmonyPatch("OnGameStart")] public static void GameStartPatch(HudManager __instance) { CustomGameModeManager.ActiveMode.HudStart(__instance); diff --git a/MiraAPI/Patches/Options/GameOptionsMenuPatch.cs b/MiraAPI/Patches/Options/GameOptionsMenuPatch.cs index 1b6d5b5..b145597 100644 --- a/MiraAPI/Patches/Options/GameOptionsMenuPatch.cs +++ b/MiraAPI/Patches/Options/GameOptionsMenuPatch.cs @@ -13,7 +13,8 @@ namespace MiraAPI.Patches.Options; [HarmonyPatch(typeof(GameOptionsMenu))] public static class GameOptionsMenuPatch { - [HarmonyPrefix, HarmonyPatch(nameof(GameOptionsMenu.CreateSettings))] + [HarmonyPrefix] + [HarmonyPatch(nameof(GameOptionsMenu.CreateSettings))] public static bool SettingsPatch(GameOptionsMenu __instance) { if (GameSettingMenuPatches.currentSelectedMod == 0) return true; @@ -98,7 +99,8 @@ public static class GameOptionsMenuPatch return false; } - [HarmonyPrefix, HarmonyPatch(nameof(GameOptionsMenu.Initialize))] + [HarmonyPrefix] + [HarmonyPatch(nameof(GameOptionsMenu.Initialize))] public static bool InitPatch(GameOptionsMenu __instance) { if (__instance.Children == null || __instance.Children.Count == 0) diff --git a/MiraAPI/Patches/Options/OptionsPatches.cs b/MiraAPI/Patches/Options/OptionsPatches.cs index 1a329f3..9bc1758 100644 --- a/MiraAPI/Patches/Options/OptionsPatches.cs +++ b/MiraAPI/Patches/Options/OptionsPatches.cs @@ -7,7 +7,8 @@ namespace MiraAPI.Patches.Options [HarmonyPatch] public static class OptionsPatches { - [HarmonyPrefix, HarmonyPatch(typeof(ToggleOption), nameof(ToggleOption.Initialize))] + [HarmonyPrefix] + [HarmonyPatch(typeof(ToggleOption), nameof(ToggleOption.Initialize))] public static bool ToggleInit(ToggleOption __instance) { if (!__instance.IsCustom()) return true; @@ -16,13 +17,15 @@ namespace MiraAPI.Patches.Options return false; } - [HarmonyPrefix, HarmonyPatch(typeof(ToggleOption), nameof(ToggleOption.UpdateValue))] + [HarmonyPrefix] + [HarmonyPatch(typeof(ToggleOption), nameof(ToggleOption.UpdateValue))] public static bool ToggleUpdate(ToggleOption __instance) { return !__instance.IsCustom(); } - [HarmonyPrefix, HarmonyPatch(typeof(NumberOption), nameof(NumberOption.Initialize))] + [HarmonyPrefix] + [HarmonyPatch(typeof(NumberOption), nameof(NumberOption.Initialize))] public static bool NumberInit(NumberOption __instance) { if (!__instance.IsCustom()) return true; @@ -31,13 +34,15 @@ namespace MiraAPI.Patches.Options return false; } - [HarmonyPrefix, HarmonyPatch(typeof(NumberOption), nameof(NumberOption.UpdateValue))] + [HarmonyPrefix] + [HarmonyPatch(typeof(NumberOption), nameof(NumberOption.UpdateValue))] public static bool NumberUpdate(NumberOption __instance) { return !__instance.IsCustom(); } - [HarmonyPrefix, HarmonyPatch(typeof(StringOption), nameof(StringOption.Initialize))] + [HarmonyPrefix] + [HarmonyPatch(typeof(StringOption), nameof(StringOption.Initialize))] public static bool StringInit(StringOption __instance) { if (!__instance.IsCustom()) return true; @@ -47,7 +52,8 @@ namespace MiraAPI.Patches.Options return false; } - [HarmonyPrefix, HarmonyPatch(typeof(StringOption), nameof(StringOption.UpdateValue))] + [HarmonyPrefix] + [HarmonyPatch(typeof(StringOption), nameof(StringOption.UpdateValue))] public static bool StringUpdate(StringOption __instance) { return !__instance.IsCustom(); diff --git a/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs b/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs index 9adecd1..dbcbfb9 100644 --- a/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs +++ b/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs @@ -19,7 +19,8 @@ namespace MiraAPI.Patches.Options [HarmonyPatch(typeof(RolesSettingsMenu))] public static class RoleSettingMenuPatches { - [HarmonyPrefix, HarmonyPatch(nameof(RolesSettingsMenu.SetQuotaTab))] + [HarmonyPrefix] + [HarmonyPatch(nameof(RolesSettingsMenu.SetQuotaTab))] public static bool PatchStart(RolesSettingsMenu __instance) { __instance.roleChances = new Il2CppSystem.Collections.Generic.List(); @@ -66,7 +67,8 @@ namespace MiraAPI.Patches.Options return false; } - [HarmonyPrefix, HarmonyPatch(nameof(RolesSettingsMenu.Update))] + [HarmonyPrefix] + [HarmonyPatch(nameof(RolesSettingsMenu.Update))] public static bool UpdatePatch() { if (GameSettingMenuPatches.currentSelectedMod == 0) diff --git a/MiraAPI/Patches/Roles/TaskAdderPatch.cs b/MiraAPI/Patches/Roles/TaskAdderPatch.cs index e45287f..cad3868 100644 --- a/MiraAPI/Patches/Roles/TaskAdderPatch.cs +++ b/MiraAPI/Patches/Roles/TaskAdderPatch.cs @@ -17,7 +17,8 @@ public static class TaskAdderPatch public static TaskFolder RolesFolder; public static System.Collections.Generic.Dictionary ModsFolders = new System.Collections.Generic.Dictionary(); - [HarmonyPostfix, HarmonyPatch(typeof(TaskAdderGame), nameof(TaskAdderGame.Begin))] + [HarmonyPostfix] + [HarmonyPatch(typeof(TaskAdderGame), nameof(TaskAdderGame.Begin))] public static void AddRolesFolder(TaskAdderGame __instance) { RolesFolder = Object.Instantiate(__instance.RootFolderPrefab, __instance.transform); @@ -42,7 +43,8 @@ public static class TaskAdderPatch __instance.GoToRoot(); } - [HarmonyPostfix, HarmonyPatch(typeof(TaskAddButton), "Role", MethodType.Setter)] + [HarmonyPostfix] + [HarmonyPatch(typeof(TaskAddButton), "Role", MethodType.Setter)] public static void RoleGetterPatch(TaskAddButton __instance) { if (__instance.role is ICustomRole lpRole)