mirror of
https://github.com/Gurge44/EndlessHostRoles.git
synced 2026-10-20 01:46:25 +00:00
KOTZ controlling team nerf + some fixes
This commit is contained in:
1 parent
e38c246e07
commit
2ac3a962cc
7 files changed
+12
-31
No files matched your search
@@ -225,24 +225,6 @@ internal static class CustomRoleSelector
|
||||
Logger.Info(string.Join(", ", Roles[RoleAssignType.Madmate].Select(x => x.Role.ToString())), "PreSelectedMadmateRoles");
|
||||
Logger.Info(string.Join(", ", Roles[RoleAssignType.Coven].Select(x => x.Role.ToString())), "PreSelectedCovenRoles");
|
||||
Logger.Msg("===================================================", "PreSelectedRoles");
|
||||
|
||||
try
|
||||
{
|
||||
int attempts = 0;
|
||||
const RoleAssignType type = RoleAssignType.NonKillingNeutral;
|
||||
|
||||
while (Roles[type].Count > nnkLimit)
|
||||
{
|
||||
if (attempts++ > 100) break;
|
||||
|
||||
if (Roles[type].Count == 0) break;
|
||||
var toRemove = Roles[type].RandomElement();
|
||||
Roles[type].Remove(toRemove);
|
||||
|
||||
Logger.Info($"Removed {toRemove.Role} from {type}", "CustomRoleSelector");
|
||||
}
|
||||
}
|
||||
catch (Exception e) { Utils.ThrowException(e); }
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user