Content changes for SetTiles change (#37229)

* Content changes for SetTiles change

* Retest with new engine changes

* Derp

* Update for new engine PR changes
This commit is contained in:
Tayrtahn
2025-05-15 06:26:47 -04:00
committed by GitHub
parent 715165f9cc
commit 4dc1c4c3d6
9 changed files with 187 additions and 161 deletions

View File

@@ -26,16 +26,19 @@ public sealed class RequiresTileSystem : EntitySystem
if (!TryComp<MapGridComponent>(ev.Entity, out var grid))
return;
var anchored = _maps.GetAnchoredEntitiesEnumerator(ev.Entity, grid, ev.NewTile.GridIndices);
if (anchored.Equals(AnchoredEntitiesEnumerator.Empty))
return;
while (anchored.MoveNext(out var ent))
foreach (var change in ev.Changes)
{
if (!_tilesQuery.HasComponent(ent.Value))
continue;
var anchored = _maps.GetAnchoredEntitiesEnumerator(ev.Entity, grid, change.GridIndices);
if (anchored.Equals(AnchoredEntitiesEnumerator.Empty))
return;
QueueDel(ent.Value);
while (anchored.MoveNext(out var ent))
{
if (!_tilesQuery.HasComponent(ent.Value))
continue;
QueueDel(ent.Value);
}
}
}
}