From 9f11874189d57a2fcbcc641876644479c6806015 Mon Sep 17 00:00:00 2001
From: XtraCube <72575280+XtraCube@users.noreply.github.com>
Date: Sun, 14 Sep 2025 15:15:06 -0400
Subject: [PATCH] fix role settings
---
MiraAPI/Patches/Roles/RoleOptionsCollectionPatch.cs | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/MiraAPI/Patches/Roles/RoleOptionsCollectionPatch.cs b/MiraAPI/Patches/Roles/RoleOptionsCollectionPatch.cs
index d867139..7f53b0a 100644
--- a/MiraAPI/Patches/Roles/RoleOptionsCollectionPatch.cs
+++ b/MiraAPI/Patches/Roles/RoleOptionsCollectionPatch.cs
@@ -9,17 +9,17 @@ namespace MiraAPI.Patches.Roles;
///
/// Patches to return the correct role counts.
///
-[HarmonyPatch(typeof(RoleOptionsCollectionV09))]
+[HarmonyPatch(typeof(RoleOptionsCollectionV10))]
public static class RoleOptionsCollectionPatch
{
///
/// This patch fixes GetNumPerGame being inlined (2025.5.20) in the original code.
///
[HarmonyPrefix]
- [HarmonyPatch(nameof(RoleOptionsCollectionV09.AnyRolesEnabled))]
- public static bool AnyRolesEnabledPrefix(RoleOptionsCollectionV09 __instance, ref bool __result)
+ [HarmonyPatch(nameof(RoleOptionsCollectionV10.AnyRolesEnabled))]
+ public static bool AnyRolesEnabledPrefix(RoleOptionsCollectionV10 __instance, ref bool __result)
{
- foreach (KeyValuePair keyValuePair in __instance.roles)
+ foreach (KeyValuePair keyValuePair in __instance.roles)
{
if (__instance.GetNumPerGame(keyValuePair.Key) > 0)
{
@@ -34,7 +34,7 @@ public static class RoleOptionsCollectionPatch
///
/// Return false to skip original method, true to not.
[HarmonyPrefix]
- [HarmonyPatch(nameof(RoleOptionsCollectionV09.GetChancePerGame))]
+ [HarmonyPatch(nameof(RoleOptionsCollectionV10.GetChancePerGame))]
public static bool GetChancePrefix(RoleTypes role, ref int __result)
{
if (!CustomRoleManager.GetCustomRoleBehaviour(role, out var customRole) || customRole == null)
@@ -64,7 +64,7 @@ public static class RoleOptionsCollectionPatch
///
/// Return false to skip original method, true to not.
[HarmonyPrefix]
- [HarmonyPatch(nameof(RoleOptionsCollectionV09.GetNumPerGame))]
+ [HarmonyPatch(nameof(RoleOptionsCollectionV10.GetNumPerGame))]
public static bool GetNumPrefix(RoleTypes role, ref int __result)
{
if (!CustomRoleManager.GetCustomRoleBehaviour(role, out var customRole) || customRole == null)