From 709b59300b54739431089bb7b263e3f60b9c92b5 Mon Sep 17 00:00:00 2001 From: Atony <75191600+AtonyGit@users.noreply.github.com> Date: Thu, 27 Aug 2026 22:37:01 -0500 Subject: [PATCH] Revert "Set role amount to 0 if chance is 0" This reverts commit 794c7629492ba05847edc28a42a1f1c632c71ede. --- MiraAPI/Patches/Options/RoleSettingMenuPatches.cs | 4 ---- MiraAPI/Roles/ICustomRole.cs | 8 -------- 2 files changed, 12 deletions(-) diff --git a/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs b/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs index 390adfb..8694bb0 100644 --- a/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs +++ b/MiraAPI/Patches/Options/RoleSettingMenuPatches.cs @@ -472,10 +472,6 @@ public static class RoleSettingMenuPatches if (role.Configuration.CanModifyChance) { role.SetChance(roleSetting.RoleChance); - if (roleSetting.RoleChance == 0 && role.Configuration.MaxRoleCount != 0) - { - role.SetCount(0); - } } } catch (Exception e) diff --git a/MiraAPI/Roles/ICustomRole.cs b/MiraAPI/Roles/ICustomRole.cs index 8f62a7f..ff061ed 100644 --- a/MiraAPI/Roles/ICustomRole.cs +++ b/MiraAPI/Roles/ICustomRole.cs @@ -164,10 +164,6 @@ public interface ICustomRole : IOptionable if (presetConfig.TryGetEntry(ChanceConfigDefinition, out ConfigEntry chanceEntry)) { SetChance(chanceEntry.Value); - if (chanceEntry.Value == 0) - { - SetCount(0); - } } } @@ -196,10 +192,6 @@ public interface ICustomRole : IOptionable /// The role count option. public virtual int? GetCount() { - if (ParentMod.PluginConfig.TryGetEntry(ChanceConfigDefinition, out ConfigEntry entry2) && entry2.Value == 0) - { - return 0; - } if (ParentMod.PluginConfig.TryGetEntry(NumConfigDefinition, out ConfigEntry entry)) { return Mathf.Clamp(entry.Value, 0, Configuration.MaxRoleCount);