From: Mervill Date: Wed, 21 Aug 2024 06:30:46 +0000 (-0700) Subject: Replace obsolete map function in AtmosphereSystem (#31252) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=c561ff1b4a15b29dbe8a344218950933e5fdd224;p=space-station-14.git Replace obsolete map function in AtmosphereSystem (#31252) --- diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs index 3830745f68..3983234dea 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs @@ -74,7 +74,7 @@ public sealed partial class AtmosphereSystem newGridAtmos = AddComp(newGrid); // We assume the tiles on the new grid have the same coordinates as they did on the old grid... - var enumerator = mapGrid.GetAllTilesEnumerator(); + var enumerator = _mapSystem.GetAllTilesEnumerator(newGrid, mapGrid); while (enumerator.MoveNext(out var tile)) { @@ -176,7 +176,7 @@ public sealed partial class AtmosphereSystem tile.AdjacentBits = AtmosDirection.Invalid; for (var i = 0; i < Atmospherics.Directions; i++) { - var direction = (AtmosDirection) (1 << i); + var direction = (AtmosDirection)(1 << i); var adjacentIndices = tile.GridIndices.Offset(direction); TileAtmosphere? adjacent; @@ -196,7 +196,7 @@ public sealed partial class AtmosphereSystem AddActiveTile(atmos, adjacent); var oppositeIndex = i.ToOppositeIndex(); - var oppositeDirection = (AtmosDirection) (1 << oppositeIndex); + var oppositeDirection = (AtmosDirection)(1 << oppositeIndex); if (adjBlockDirs.IsFlagSet(oppositeDirection) || blockedDirs.IsFlagSet(direction)) { @@ -269,7 +269,7 @@ public sealed partial class AtmosphereSystem private void GridFixTileVacuum(TileAtmosphere tile) { DebugTools.AssertNotNull(tile.Air); - DebugTools.Assert(tile.Air?.Immutable == false ); + DebugTools.Assert(tile.Air?.Immutable == false); Array.Clear(tile.MolesArchived); tile.ArchivedCycle = 0;