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

@@ -122,13 +122,16 @@ namespace Content.Shared.SubFloor
private void OnTileChanged(ref TileChangedEvent args)
{
if (args.OldTile.IsEmpty)
return; // Nothing is anchored here anyways.
foreach (var change in args.Changes)
{
if (change.OldTile.IsEmpty)
return; // Nothing is anchored here anyways.
if (args.NewTile.Tile.IsEmpty)
return; // Anything that was here will be unanchored anyways.
if (change.NewTile.IsEmpty)
return; // Anything that was here will be unanchored anyways.
UpdateTile(args.NewTile.GridUid, args.Entity.Comp, args.NewTile.GridIndices);
UpdateTile(args.Entity, args.Entity.Comp, change.GridIndices);
}
}
/// <summary>