Replace obsolete Tile Access methods (#32508)

* Replace obsolete SetTile

* Remove obsolete GetTileRef & GetAllTiles

* Forgor

* Apply suggested `GetMapOrInvalid`
This commit is contained in:
MilenVolf
2024-09-29 02:27:47 +03:00
committed by GitHub
parent 0a7b23cd4d
commit 1b9d77a760
18 changed files with 59 additions and 40 deletions

View File

@@ -35,6 +35,7 @@ public abstract class SharedEmitSoundSystem : EntitySystem
[Dependency] private readonly SharedAmbientSoundSystem _ambient = default!;
[Dependency] private readonly SharedAudioSystem _audioSystem = default!;
[Dependency] protected readonly SharedPopupSystem Popup = default!;
[Dependency] private readonly SharedMapSystem _map = default!;
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
public override void Initialize()
@@ -86,7 +87,7 @@ public abstract class SharedEmitSoundSystem : EntitySystem
return;
}
var tile = grid.GetTileRef(xform.Coordinates);
var tile = _map.GetTileRef(xform.GridUid.Value, grid, xform.Coordinates);
// Handle maps being grids (we'll still emit the sound).
if (xform.GridUid != xform.MapUid && tile.IsSpace(_tileDefMan))