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