Load Maps on Round Start, not Round Restart v3 (#6989)
* Load Maps on Round Start, not Round Restart * Fix admin log test. It assumed maps/grids existed during pre-round, wihch is not a valid assumption anymore after this PR. * Shutdown server if round fails to start 5 times. * Fix bugs with round starting flag. * Make StartRound not async, synchronously get new round ID from DB. * Handle StationId.Invalid in PickBestAvailableJob Instead of crashing, return null. SpawnPlayer will handle this by making the player an observer or returning them to the lobby.
This commit is contained in:
committed by
GitHub
parent
1ff687f482
commit
9ab3bb5811
@@ -234,8 +234,6 @@ public sealed class AddTests : ContentIntegrationTest
|
||||
await server.WaitIdleAsync();
|
||||
|
||||
var sDatabase = server.ResolveDependency<IServerDbManager>();
|
||||
var sEntities = server.ResolveDependency<IEntityManager>();
|
||||
var sMaps = server.ResolveDependency<IMapManager>();
|
||||
var sSystems = server.ResolveDependency<IEntitySystemManager>();
|
||||
|
||||
var sAdminLogSystem = sSystems.GetEntitySystem<AdminLogSystem>();
|
||||
@@ -245,10 +243,7 @@ public sealed class AddTests : ContentIntegrationTest
|
||||
|
||||
await server.WaitPost(() =>
|
||||
{
|
||||
var coordinates = GetMainEntityCoordinates(sMaps);
|
||||
var entity = sEntities.SpawnEntity(null, coordinates);
|
||||
|
||||
sAdminLogSystem.Add(LogType.Unknown, $"{entity} test log: {guid}");
|
||||
sAdminLogSystem.Add(LogType.Unknown, $"test log: {guid}");
|
||||
});
|
||||
|
||||
await server.WaitPost(() =>
|
||||
@@ -284,8 +279,7 @@ 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();
|
||||
|
||||
Reference in New Issue
Block a user