]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Replace obsolete map function in AtmosphereSystem (#31252)
authorMervill <mervills.email@gmail.com>
Wed, 21 Aug 2024 06:30:46 +0000 (23:30 -0700)
committerGitHub <noreply@github.com>
Wed, 21 Aug 2024 06:30:46 +0000 (23:30 -0700)
Content.Server/Atmos/EntitySystems/AtmosphereSystem.GridAtmosphere.cs

index 3830745f68ce9fe56fc95e26f83938b136ebcf0a..3983234dea6e99fb20a6bbeb113d820cf8f3fb82 100644 (file)
@@ -74,7 +74,7 @@ public sealed partial class AtmosphereSystem
                 newGridAtmos = AddComp<GridAtmosphereComponent>(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;