diff --git a/Content.IntegrationTests/Tests/Administration/Logs/AddTests.cs b/Content.IntegrationTests/Tests/Administration/Logs/AddTests.cs index 4acbdf6dcd..3ee54af303 100644 --- a/Content.IntegrationTests/Tests/Administration/Logs/AddTests.cs +++ b/Content.IntegrationTests/Tests/Administration/Logs/AddTests.cs @@ -234,6 +234,8 @@ public sealed class AddTests : ContentIntegrationTest await server.WaitIdleAsync(); var sDatabase = server.ResolveDependency(); + var sEntities = server.ResolveDependency(); + var sMaps = server.ResolveDependency(); var sSystems = server.ResolveDependency(); var sAdminLogSystem = sSystems.GetEntitySystem(); @@ -243,7 +245,10 @@ public sealed class AddTests : ContentIntegrationTest await server.WaitPost(() => { - sAdminLogSystem.Add(LogType.Unknown, $"test log: {guid}"); + var coordinates = GetMainEntityCoordinates(sMaps); + var entity = sEntities.SpawnEntity(null, coordinates); + + sAdminLogSystem.Add(LogType.Unknown, $"{entity} test log: {guid}"); }); await server.WaitPost(() => @@ -279,7 +284,8 @@ public sealed class AddTests : ContentIntegrationTest await foreach (var json in sDatabase.GetAdminLogsJson(filter)) { var root = json.RootElement; - + + Assert.That(root.TryGetProperty("entity", out _), Is.True); Assert.That(root.TryGetProperty("guid", out _), Is.True); json.Dispose(); diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index 55c29666d8..3a782e5994 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -190,8 +190,6 @@ namespace Content.Server.GameTicking SendServerMessage(Loc.GetString("game-ticker-start-round")); - LoadMaps(); - StartGamePresetRules(); RoundLengthMetric.Set(0); @@ -375,6 +373,7 @@ namespace Content.Server.GameTicking RunLevel = GameRunLevel.PreRoundLobby; LobbySong = _robustRandom.Pick(_lobbyMusicCollection.PickFiles).ToString(); ResettingCleanup(); + LoadMaps(); if (!LobbyEnabled) { @@ -412,18 +411,18 @@ namespace Content.Server.GameTicking unCastData.ContentData()?.WipeMind(); } - _startingRound = false; - - _mapManager.Restart(); - - // Delete all remaining entities. - foreach (var entity in EntityManager.GetEntities().ToArray()) + // Delete all entities. + foreach (var entity in EntityManager.GetEntities().ToList()) { // TODO: Maybe something less naive here? // FIXME: Actually, definitely. EntityManager.DeleteEntity(entity); } + _startingRound = false; + + _mapManager.Restart(); + _roleBanManager.Restart(); // Clear up any game rules.