Make test EntitySpecifiers ignore entities with null prototypes (#22174)

This commit is contained in:
TemporalOroboros
2023-12-06 17:09:44 -08:00
committed by GitHub
parent 17e01430fb
commit 0c63f2ee57
3 changed files with 14 additions and 7 deletions

View File

@@ -598,7 +598,7 @@ public abstract partial class InteractionTest
/// <summary>
/// Performs an entity lookup and asserts that only the listed entities exist and that they are all present.
/// Ignores the grid, map, player, target and contained entities.
/// Ignores the grid, map, player, target, contained entities, and entities with null prototypes.
/// </summary>
protected async Task AssertEntityLookup(
EntitySpecifierCollection collection,
@@ -652,6 +652,9 @@ public abstract partial class InteractionTest
foreach (var uid in entities)
{
var found = ToEntitySpecifier(uid);
if (found is null)
continue;
if (spec.Prototype != found.Prototype)
continue;