Fix for obsolete method warning in AtmosphericsSystem (#37897)

* 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
This commit is contained in:
TemporalOroboros
2025-05-28 02:16:54 -07:00
committed by GitHub
parent 6368baf96e
commit f99d00cf5f
2 changed files with 7 additions and 6 deletions

View File

@@ -550,7 +550,7 @@ namespace Content.Server.Atmos.EntitySystems
} }
InvalidateVisuals(ent, otherTile); InvalidateVisuals(ent, otherTile);
HandleDecompressionFloorRip(mapGrid, otherTile, otherTile.MonstermosInfo.CurrentTransferAmount); HandleDecompressionFloorRip((owner, mapGrid), otherTile, otherTile.MonstermosInfo.CurrentTransferAmount);
} }
if (GridImpulse && tileCount > 0) if (GridImpulse && tileCount > 0)
@@ -682,7 +682,7 @@ namespace Content.Server.Atmos.EntitySystems
adj.MonstermosInfo[idx.ToOppositeDir()] -= amount; 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) if (!MonstermosRipTiles)
return; return;

View File

@@ -28,7 +28,8 @@ public partial class AtmosphereSystem
// Pay more for gas canisters that are more pure // Pay more for gas canisters that are more pure
float purity = 1; float purity = 1;
if (totalMoles > 0) { if (totalMoles > 0)
{
purity = maxComponent / totalMoles; purity = maxComponent / totalMoles;
} }
@@ -106,9 +107,9 @@ public partial class AtmosphereSystem
/// </summary> /// </summary>
/// <param name="mapGrid">The grid in question.</param> /// <param name="mapGrid">The grid in question.</param>
/// <param name="tile">The indices of the tile.</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; return;
_tile.PryTile(tileRef); _tile.PryTile(tileRef);