Add SpawnAndDirtyAllEntities test (#13629)

This commit is contained in:
Leon Friedrich
2023-01-24 13:33:49 +13:00
committed by GitHub
parent fb3df96654
commit 554ec85069
6 changed files with 86 additions and 32 deletions

View File

@@ -86,7 +86,7 @@ namespace Content.Server.Decals
return;
// Should this be a full component state or a delta-state?
if (args.FromTick <= component.CreationTick && args.FromTick <= component.ForceTick)
if (args.FromTick <= component.CreationTick || args.FromTick <= component.ForceTick)
{
args.State = new DecalGridState(component.ChunkCollection.ChunkCollection);
return;

View File

@@ -361,7 +361,8 @@ namespace Content.Server.GameTicking
}
// AAAAAAAAAAAAA
_sawmill.Error("Found no observer spawn points!");
// This should be an error, if it didn't cause tests to start erroring when they delete a player.
_sawmill.Warning("Found no observer spawn points!");
return EntityCoordinates.Invalid;
}
#endregion

View File

@@ -102,9 +102,11 @@ public sealed class MindSystem : EntitySystem
}
// TODO refactor observer spawning.
// please.
if (!spawnPosition.IsValid(EntityManager))
{
Logger.ErrorS("mind", $"Entity \"{ToPrettyString(uid)}\" for {mind.Mind?.CharacterName} was deleted, and no applicable spawn location is available.");
// This should be an error, if it didn't cause tests to start erroring when they delete a player.
Logger.WarningS("mind", $"Entity \"{ToPrettyString(uid)}\" for {mind.Mind?.CharacterName} was deleted, and no applicable spawn location is available.");
return;
}