Code Cleanup: Purge obsolete MapManager methods (#26279)

* GetGrid

* GridExists

* TryGetGrid

(cherry picked from commit ae3d745430)
This commit is contained in:
Tayrtahn
2024-03-24 00:13:35 +01:00
committed by NullWanderer
parent 87a3ba7615
commit eb4cd9bc0b
49 changed files with 97 additions and 122 deletions
@@ -4,6 +4,7 @@ using Content.Shared.Administration;
using Content.Shared.Explosion;
using Content.Shared.Explosion.Components;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Physics.Components;
using Robust.Shared.Timing;
@@ -56,7 +57,7 @@ public sealed partial class ExplosionSystem : EntitySystem
else if (referenceGrid != null)
{
// reference grid defines coordinate system that the explosion in space will use
initialTile = _mapManager.GetGrid(referenceGrid.Value).WorldToTile(epicenter.Position);
initialTile = Comp<MapGridComponent>(referenceGrid.Value).WorldToTile(epicenter.Position);
}
else
{
@@ -87,7 +88,7 @@ public sealed partial class ExplosionSystem : EntitySystem
var spaceAngle = Angle.Zero;
if (referenceGrid != null)
{
var xform = Transform(_mapManager.GetGrid(referenceGrid.Value).Owner);
var xform = Transform(Comp<MapGridComponent>(referenceGrid.Value).Owner);
spaceMatrix = xform.WorldMatrix;
spaceAngle = xform.WorldRotation;
}
@@ -102,7 +103,7 @@ public sealed partial class ExplosionSystem : EntitySystem
airtightMap = new();
var initialGridData = new ExplosionGridTileFlood(
_mapManager.GetGrid(epicentreGrid.Value),
Comp<MapGridComponent>(epicentreGrid.Value),
airtightMap,
maxIntensity,
stepSize,
@@ -191,7 +192,7 @@ public sealed partial class ExplosionSystem : EntitySystem
airtightMap = new();
data = new ExplosionGridTileFlood(
_mapManager.GetGrid(grid),
Comp<MapGridComponent>(grid),
airtightMap,
maxIntensity,
stepSize,