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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user