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

@@ -236,10 +236,9 @@ public sealed class ArrivalsSystem : EntitySystem
}
var children = xform.ChildEnumerator;
while (children.MoveNext(out var child))
{
DumpChildren(child.Value, ref args, pendingEntQuery, arrivalsBlacklistQuery, mobQuery, xformQuery);
DumpChildren(child, ref args, pendingEntQuery, arrivalsBlacklistQuery, mobQuery, xformQuery);
}
}

View File

@@ -501,10 +501,10 @@ public sealed partial class ShuttleSystem
var childEnumerator = xform.ChildEnumerator;
while (childEnumerator.MoveNext(out var child))
{
if (!_buckleQuery.TryGetComponent(child.Value, out var buckle) || buckle.Buckled)
if (!_buckleQuery.TryGetComponent(child, out var buckle) || buckle.Buckled)
continue;
toKnock.Add(child.Value);
toKnock.Add(child);
}
}

View File

@@ -148,7 +148,7 @@ public sealed partial class ShuttleSystem
if (!dockQuery.TryGetComponent(child, out var dock))
continue;
return (child.Value, dock);
return (child, dock);
}
return null;