Code Cleanup: Purge obsolete MapManager methods (#26279)
* GetGrid * GridExists * TryGetGrid
This commit is contained in:
@@ -2,7 +2,6 @@ using Content.Shared.Popups;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.Revenant;
|
||||
using Robust.Shared.Random;
|
||||
using Robust.Shared.Map;
|
||||
using Content.Shared.Tag;
|
||||
using Content.Server.Storage.Components;
|
||||
using Content.Server.Light.Components;
|
||||
@@ -15,7 +14,6 @@ using Content.Shared.Item;
|
||||
using Content.Shared.Bed.Sleep;
|
||||
using System.Linq;
|
||||
using System.Numerics;
|
||||
using Content.Server.Maps;
|
||||
using Content.Server.Revenant.Components;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Emag.Systems;
|
||||
@@ -28,12 +26,12 @@ using Content.Shared.Mobs.Systems;
|
||||
using Content.Shared.Revenant.Components;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
namespace Content.Server.Revenant.EntitySystems;
|
||||
|
||||
public sealed partial class RevenantSystem
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly ThrowingSystem _throwing = default!;
|
||||
[Dependency] private readonly EntityStorageSystem _entityStorage = default!;
|
||||
[Dependency] private readonly EmagSystem _emag = default!;
|
||||
@@ -213,7 +211,7 @@ public sealed partial class RevenantSystem
|
||||
//var coords = Transform(uid).Coordinates;
|
||||
//var gridId = coords.GetGridUid(EntityManager);
|
||||
var xform = Transform(uid);
|
||||
if (!_mapManager.TryGetGrid(xform.GridUid, out var map))
|
||||
if (!TryComp<MapGridComponent>(xform.GridUid, out var map))
|
||||
return;
|
||||
var tiles = map.GetTilesIntersecting(Box2.CenteredAround(xform.WorldPosition,
|
||||
new Vector2(component.DefileRadius * 2, component.DefileRadius))).ToArray();
|
||||
|
||||
Reference in New Issue
Block a user