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,7 +35,7 @@ namespace Content.Server.Decals
[Dependency] private readonly IConfigurationManager _conf = default!;
[Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly MapSystem _mapSystem = default!;
[Dependency] private readonly SharedMapSystem _mapSystem = default!;
private readonly Dictionary<NetEntity, HashSet<Vector2i>> _dirtyChunks = new();
private readonly Dictionary<ICommonSession, Dictionary<NetEntity, HashSet<Vector2i>>> _previousSentChunks = new();
@@ -106,7 +106,7 @@ namespace Content.Server.Decals
return;
// Transfer decals over to the new grid.
var enumerator = Comp<MapGridComponent>(ev.Grid).GetAllTilesEnumerator();
var enumerator = _mapSystem.GetAllTilesEnumerator(ev.Grid, Comp<MapGridComponent>(ev.Grid));
var oldChunkCollection = oldComp.ChunkCollection.ChunkCollection;
var chunkCollection = newComp.ChunkCollection.ChunkCollection;