]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix player rolling agent and operative at the same time (#23568)
authordolgovmi <96251346+dolgovmi@users.noreply.github.com>
Sat, 6 Jan 2024 04:19:11 +0000 (11:19 +0700)
committerGitHub <noreply@github.com>
Sat, 6 Jan 2024 04:19:11 +0000 (21:19 -0700)
Update NukeopsRuleSystem.cs

Probably fix the double pick bug by removing the picked agent from the Operative list

Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs

index 59924fd8ecddf44c2b2b9e94358bed1a0cc9a087..870586e554df64caeb21b340f33eb13abe8f2a29 100644 (file)
@@ -713,6 +713,7 @@ public sealed class NukeopsRuleSystem : GameRuleSystem<NukeopsRuleComponent>
                     {
                         nukeOp = _random.PickAndTake(medPrefList);
                         everyone.Remove(nukeOp);
+                        prefList.Remove(nukeOp);
                         Logger.InfoS("preset", "Insufficient preferred nukeop commanders, picking an agent");
                     }