diff --git a/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs b/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs index 8788821..a0c1a54 100644 --- a/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs +++ b/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs @@ -341,12 +341,13 @@ private static void CreateQuotaOption(RolesSettingsMenu __instance, RoleBehaviou passiveButton.OnClick.AddListener((UnityAction)(() => { ChangeTab(role, __instance); })); } - if (customRole.Configuration.MaxRoleCount == 0 && customRole.Configuration.CanModifyChance) + if (customRole.Configuration is { MaxRoleCount: 0 }) { roleOptionSetting.CountMinusBtn.gameObject.SetActive(false); roleOptionSetting.CountPlusBtn.gameObject.SetActive(false); } - else if (!customRole.Configuration.CanModifyChance) + + if (!customRole.Configuration.CanModifyChance) { roleOptionSetting.ChanceMinusBtn.gameObject.SetActive(false); roleOptionSetting.ChancePlusBtn.gameObject.SetActive(false);