Add some tests and fix some miscellaneous bugs (#22836)
* Add some tests and fix some bugs * Add more helper methods * remove submodule * fix merge * also fix DirtyAll() * poke
This commit is contained in:
@@ -312,7 +312,7 @@ public sealed class SpreaderSystem : EntitySystem
|
||||
if (position == null)
|
||||
{
|
||||
var transform = Transform(uid);
|
||||
if (!_mapManager.TryGetGrid(transform.GridUid, out grid))
|
||||
if (!_mapManager.TryGetGrid(transform.GridUid, out grid) || TerminatingOrDeleted(transform.GridUid.Value))
|
||||
return neighbors;
|
||||
tile = grid.TileIndicesFor(transform.Coordinates);
|
||||
}
|
||||
@@ -337,7 +337,7 @@ public sealed class SpreaderSystem : EntitySystem
|
||||
while (directionEnumerator.MoveNext(out var ent))
|
||||
{
|
||||
DebugTools.Assert(Transform(ent.Value).Anchored);
|
||||
if (spreaderQuery.HasComponent(ent))
|
||||
if (spreaderQuery.HasComponent(ent) && !TerminatingOrDeleted(ent.Value))
|
||||
neighbors.Add(ent.Value);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user