Fixed players without headrevs ticked being picked anyway (#20895)

* Fixy fix fix uwu merge pwease

* admin message to inform them

* oop
This commit is contained in:
Vasilis
2023-10-19 05:48:55 +02:00
committed by GitHub
parent 3e32e75737
commit e04d6a312c
4 changed files with 12 additions and 4 deletions

View File

@@ -142,9 +142,14 @@ public sealed class RevolutionaryRuleSystem : GameRuleSystem<RevolutionaryRuleCo
var query = QueryActiveRules();
while (query.MoveNext(out _, out var comp, out _))
{
_antagSelection.EligiblePlayers(comp.RevPrototypeId, comp.MaxHeadRevs, comp.PlayersPerHeadRev, comp.HeadRevStartSound,
_antagSelection.EligiblePlayers(comp.HeadRevPrototypeId, comp.MaxHeadRevs, comp.PlayersPerHeadRev, comp.HeadRevStartSound,
"head-rev-role-greeting", "#5e9cff", out var chosen);
GiveHeadRev(chosen, comp.RevPrototypeId, comp);
if (!chosen.Any())
GiveHeadRev(chosen, comp.RevPrototypeId, comp);
else
{
_chatManager.SendAdminAnnouncement(Loc.GetString("rev-no-heads"));
}
}
}