From f932c4f3fff4ef76648d78522067e20504e278e1 Mon Sep 17 00:00:00 2001 From: XtraCube <72575280+XtraCube@users.noreply.github.com> Date: Thu, 19 Sep 2024 20:56:28 -0400 Subject: [PATCH] adjustment to role setting menu --- MiraAPI/Patches/Options/RoleSettingMenuPatches.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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);