Skip to content

Commit

Permalink
adjustment to role setting menu
Browse files Browse the repository at this point in the history
  • Loading branch information
XtraCube committed Sep 20, 2024
1 parent 2666aa1 commit f932c4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MiraAPI/Patches/Options/RoleSettingMenuPatches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f932c4f

Please sign in to comment.