diff --git a/Content.Server/Corvax/StationGoal/StationGoalPaperSystem.cs b/Content.Server/Corvax/StationGoal/StationGoalPaperSystem.cs index e59298291d0..3cd9e9ce056 100644 --- a/Content.Server/Corvax/StationGoal/StationGoalPaperSystem.cs +++ b/Content.Server/Corvax/StationGoal/StationGoalPaperSystem.cs @@ -36,16 +36,17 @@ private void OnRoundStarting(RoundStartingEvent ev) var query = EntityQueryEnumerator(); while (query.MoveNext(out var uid, out var station)) { + var tempGoals = new List>(station.Goals); StationGoalPrototype? selGoal = null; - while (station.Goals.Count > 0) + while (tempGoals.Count > 0) { - var goalId = _random.Pick(station.Goals); + var goalId = _random.Pick(tempGoals); var goalProto = _proto.Index(goalId); if (playerCount > goalProto.MaxPlayers || playerCount < goalProto.MinPlayers) { - station.Goals.Remove(goalId); + tempGoals.Remove(goalId); continue; }