Remove uses of TransformComponent.ChildEntities (#22442)

* Make output of ChildEnumerator non-nullable

* Remove uses of ChildEntities

* poke tests

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Leon Friedrich
2023-12-16 11:09:50 -05:00
committed by GitHub
parent aa08cc3e53
commit 9a3342d972
12 changed files with 26 additions and 21 deletions

View File

@@ -72,7 +72,8 @@ namespace Content.Server.Construction.Commands
var underplating = _tileDefManager[TilePrototypeId];
var underplatingTile = new Tile(underplating.TileId);
var changed = 0;
foreach (var child in _entManager.GetComponent<TransformComponent>(gridId.Value).ChildEntities)
var enumerator = _entManager.GetComponent<TransformComponent>(gridId.Value).ChildEnumerator;
while (enumerator.MoveNext(out var child))
{
if (!_entManager.EntityExists(child))
{