mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
formatting
This commit is contained in:
1 parent
0f26cadd9a
commit
b053684235
2 files changed
+10
-7
No files matched your search
@@ -18,10 +18,10 @@ namespace MiraAPI.GameOptions;
|
||||
/// </summary>
|
||||
public static class ModdedOptionsManager
|
||||
{
|
||||
private static readonly Dictionary<PropertyInfo, ModdedOptionAttribute> OptionAttributes = new();
|
||||
private static readonly Dictionary<Type, AbstractOptionGroup> TypeToGroup = new();
|
||||
private static readonly Dictionary<PropertyInfo, ModdedOptionAttribute> OptionAttributes = [];
|
||||
private static readonly Dictionary<Type, AbstractOptionGroup> TypeToGroup = [];
|
||||
|
||||
internal static readonly Dictionary<uint, IModdedOption> ModdedOptions = new();
|
||||
internal static readonly Dictionary<uint, IModdedOption> ModdedOptions = [];
|
||||
internal static readonly List<AbstractOptionGroup> Groups = [];
|
||||
|
||||
internal static uint NextId => _nextId++;
|
||||
|
||||
@@ -3,15 +3,18 @@ using MiraAPI.Roles;
|
||||
|
||||
namespace MiraAPI.Patches.Roles;
|
||||
|
||||
/// <summary>
|
||||
/// Patches for custom ejection messages.
|
||||
/// </summary>
|
||||
[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);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user