From f66b57ca471b4806fee7d98697207c4feb52ef42 Mon Sep 17 00:00:00 2001 From: moonheart08 Date: Tue, 10 May 2022 14:33:08 -0500 Subject: [PATCH] I successfully broke the game. --- .../Station/Systems/StationJobsSystem.Roundstart.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Server/Station/Systems/StationJobsSystem.Roundstart.cs b/Content.Server/Station/Systems/StationJobsSystem.Roundstart.cs index 094484903c..41c481065f 100644 --- a/Content.Server/Station/Systems/StationJobsSystem.Roundstart.cs +++ b/Content.Server/Station/Systems/StationJobsSystem.Roundstart.cs @@ -109,9 +109,11 @@ public sealed partial class StationJobsSystem void AssignPlayer(NetUserId player, string job, EntityUid station) { // Remove the player from all possible jobs as that's faster than actually checking what they have selected. - foreach (var (_, players) in jobPlayerOptions) + foreach (var (k, players) in jobPlayerOptions) { players.Remove(player); + if (players.Count == 0) + jobPlayerOptions.Remove(k); } stationJobs[station][job]--;