diff --git a/MiraAPI/GameOptions/ModdedOptionsManager.cs b/MiraAPI/GameOptions/ModdedOptionsManager.cs index b57528e..1300d61 100644 --- a/MiraAPI/GameOptions/ModdedOptionsManager.cs +++ b/MiraAPI/GameOptions/ModdedOptionsManager.cs @@ -18,10 +18,10 @@ namespace MiraAPI.GameOptions; /// public static class ModdedOptionsManager { - private static readonly Dictionary OptionAttributes = new(); - private static readonly Dictionary TypeToGroup = new(); + private static readonly Dictionary OptionAttributes = []; + private static readonly Dictionary TypeToGroup = []; - internal static readonly Dictionary ModdedOptions = new(); + internal static readonly Dictionary ModdedOptions = []; internal static readonly List Groups = []; internal static uint NextId => _nextId++; diff --git a/MiraAPI/Patches/Roles/EjectionPatches.cs b/MiraAPI/Patches/Roles/EjectionPatches.cs index bbea1e8..9f85872 100644 --- a/MiraAPI/Patches/Roles/EjectionPatches.cs +++ b/MiraAPI/Patches/Roles/EjectionPatches.cs @@ -3,15 +3,18 @@ using MiraAPI.Roles; namespace MiraAPI.Patches.Roles; +/// +/// Patches for custom ejection messages. +/// [HarmonyPatch(typeof(ExileController))] public static class EjectionPatches { - [HarmonyPostfix] [HarmonyPatch(nameof(ExileController.Begin))] - public static void Begin(ExileController __instance) + public static void BeginPostfix(ExileController __instance) { - if (!__instance.initData.networkedPlayer || !__instance.initData.networkedPlayer.Role || __instance.initData.networkedPlayer.Role is not ICustomRole role) + if (!__instance.initData.networkedPlayer || !__instance.initData.networkedPlayer.Role || + __instance.initData.networkedPlayer.Role is not ICustomRole role) { return; } @@ -23,4 +26,4 @@ public static class EjectionPatches __instance.completeString = role.GetCustomEjectionMessage(__instance.initData.networkedPlayer); } -} \ No newline at end of file +}