mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-19 15:51:48 +00:00
Fix config disappearing issue
This commit is contained in:
1 parent
95f78addee
commit
52daf69dfe
1 file changed
+11
-11
@@ -318,17 +318,6 @@ public static class RoleSettingMenuPatches
|
||||
roleOptionSetting.SetClickMask(__instance.ButtonClickMask);
|
||||
__instance.roleChances.Add(roleOptionSetting);
|
||||
|
||||
if (customRole.Configuration.MaxRoleCount == 0 && customRole.Configuration.CanModifyChance)
|
||||
{
|
||||
roleOptionSetting.CountMinusBtn.gameObject.SetActive(false);
|
||||
roleOptionSetting.CountPlusBtn.gameObject.SetActive(false);
|
||||
}
|
||||
else if (!customRole.Configuration.CanModifyChance)
|
||||
{
|
||||
roleOptionSetting.ChanceMinusBtn.gameObject.SetActive(false);
|
||||
roleOptionSetting.ChancePlusBtn.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
roleOptionSetting.titleText.transform.localPosition = new Vector3(-0.5376f, -0.2923f, 0f);
|
||||
roleOptionSetting.titleText.color = customRole.RoleColor.GetAlternateColor();
|
||||
roleOptionSetting.titleText.horizontalAlignment = HorizontalAlignmentOptions.Left;
|
||||
@@ -354,6 +343,17 @@ public static class RoleSettingMenuPatches
|
||||
passiveButton.OnClick.AddListener((UnityAction)(() => { ChangeTab(role, __instance); }));
|
||||
}
|
||||
|
||||
if (customRole.Configuration.MaxRoleCount == 0 && customRole.Configuration.CanModifyChance)
|
||||
{
|
||||
roleOptionSetting.CountMinusBtn.gameObject.SetActive(false);
|
||||
roleOptionSetting.CountPlusBtn.gameObject.SetActive(false);
|
||||
}
|
||||
else if (!customRole.Configuration.CanModifyChance)
|
||||
{
|
||||
roleOptionSetting.ChanceMinusBtn.gameObject.SetActive(false);
|
||||
roleOptionSetting.ChancePlusBtn.gameObject.SetActive(false);
|
||||
}
|
||||
|
||||
if (index < GameSettingMenuPatches.SelectedMod?.CustomRoles.Count - 1)
|
||||
{
|
||||
yPos += -0.43f;
|
||||
|
||||
Reference in new issue
Block a user