Fix station deletion bug (#10348)
This commit is contained in:
@@ -101,6 +101,7 @@ namespace Content.IntegrationTests.Tests
|
||||
"DebugExceptionStartup",
|
||||
"Map", // We aren't testing a map entity in this test
|
||||
"MapGrid",
|
||||
"StationData", // errors when removed mid-round
|
||||
"Actor", // We aren't testing actor components, those need their player session set.
|
||||
};
|
||||
|
||||
@@ -195,6 +196,7 @@ namespace Content.IntegrationTests.Tests
|
||||
"DebugExceptionStartup",
|
||||
"Map", // We aren't testing a map entity in this test
|
||||
"MapGrid",
|
||||
"StationData", // errors when deleted mid-round
|
||||
"Actor", // We aren't testing actor components, those need their player session set.
|
||||
};
|
||||
|
||||
|
||||
@@ -43,22 +43,7 @@ public sealed class FollowerSystemTest
|
||||
|
||||
followerSystem.StartFollowingEntity(follower, followed);
|
||||
|
||||
foreach (var ent in entMan.GetEntities().ToArray())
|
||||
{
|
||||
// Let's skip entities that have been deleted, as we want to get their TransformComp for extra info.
|
||||
if (entMan.Deleted(ent))
|
||||
{
|
||||
logger.Info($"Skipping {entMan.ToPrettyString(ent)}...");
|
||||
continue;
|
||||
}
|
||||
|
||||
// Log some information about the entity before we delete it.
|
||||
var transform = entMan.GetComponent<TransformComponent>(ent);
|
||||
logger.Info($"Deleting entity {entMan.ToPrettyString(ent)}... Parent: {entMan.ToPrettyString(transform.ParentUid)} | Children: {string.Join(", ", transform.Children.Select(c => entMan.ToPrettyString(c.Owner)))}");
|
||||
|
||||
// Actually delete the entity now.
|
||||
entMan.DeleteEntity(ent);
|
||||
}
|
||||
entMan.DeleteEntity(mapMan.GetMapEntityId(map));
|
||||
});
|
||||
await pairTracker.CleanReturnAsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user