]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix for obsolete method warning in AtmosphericsSystem (#37897)
authorTemporalOroboros <TemporalOroboros@gmail.com>
Wed, 28 May 2025 09:16:54 +0000 (02:16 -0700)
committerGitHub <noreply@github.com>
Wed, 28 May 2025 09:16:54 +0000 (11:16 +0200)
* Make PryTile use Entity<T>
Converts the old parameters into an obsolete overload

* Make HandleDecompressionFloorRip use Entity<T>
Converts the old parameters into an obsolete overload

* Convert the one use to use Entity<T>

* Delete obsolete private methods

Content.Server/Atmos/EntitySystems/AtmosphereSystem.Monstermos.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Utils.cs

index e6466c8157f8cae48b93813c6b13e96132e2028b..cca529fd58758f771a79f978c8b596b1687d281a 100644 (file)
@@ -550,7 +550,7 @@ namespace Content.Server.Atmos.EntitySystems
                 }
 
                 InvalidateVisuals(ent, otherTile);
-                HandleDecompressionFloorRip(mapGrid, otherTile, otherTile.MonstermosInfo.CurrentTransferAmount);
+                HandleDecompressionFloorRip((owner, mapGrid), otherTile, otherTile.MonstermosInfo.CurrentTransferAmount);
             }
 
             if (GridImpulse && tileCount > 0)
@@ -682,7 +682,7 @@ namespace Content.Server.Atmos.EntitySystems
             adj.MonstermosInfo[idx.ToOppositeDir()] -= amount;
         }
 
-        private void HandleDecompressionFloorRip(MapGridComponent mapGrid, TileAtmosphere tile, float sum)
+        private void HandleDecompressionFloorRip(Entity<MapGridComponent> mapGrid, TileAtmosphere tile, float sum)
         {
             if (!MonstermosRipTiles)
                 return;
index cf4c73aa2f4c9e9c02a22450ed004a2b38cde11c..36355d7ba035d72ecebafd1da4b79acb0a04c1c4 100644 (file)
@@ -28,7 +28,8 @@ public partial class AtmosphereSystem
 
         // Pay more for gas canisters that are more pure
         float purity = 1;
-        if (totalMoles > 0) {
+        if (totalMoles > 0)
+        {
             purity = maxComponent / totalMoles;
         }
 
@@ -88,7 +89,7 @@ public partial class AtmosphereSystem
 
             fixVacuum |= airtight.FixVacuum;
 
-            if(!airtight.AirBlocked)
+            if (!airtight.AirBlocked)
                 continue;
 
             blockedDirs |= airtight.AirBlockedDirection;
@@ -106,9 +107,9 @@ public partial class AtmosphereSystem
     /// </summary>
     /// <param name="mapGrid">The grid in question.</param>
     /// <param name="tile">The indices of the tile.</param>
-    private void PryTile(MapGridComponent mapGrid, Vector2i tile)
+    private void PryTile(Entity<MapGridComponent> mapGrid, Vector2i tile)
     {
-        if (!mapGrid.TryGetTileRef(tile, out var tileRef))
+        if (!_mapSystem.TryGetTileRef(mapGrid.Owner, mapGrid.Comp, tile, out var tileRef))
             return;
 
         _tile.PryTile(tileRef);