Code Cleanup: Purge obsolete MapManager methods (#26279)
* GetGrid * GridExists * TryGetGrid
This commit is contained in:
@@ -12,18 +12,15 @@ using Content.Shared.Mobs;
|
||||
using Content.Shared.Movement.Systems;
|
||||
using Content.Shared.NPC.Systems;
|
||||
using Content.Shared.Zombies;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
namespace Content.Server.Dragon;
|
||||
|
||||
public sealed partial class DragonSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly CarpRiftsConditionSystem _carpRifts = default!;
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly ITileDefinitionManager _tileDef = default!;
|
||||
[Dependency] private readonly MovementSpeedModifierSystem _movement = default!;
|
||||
[Dependency] private readonly NpcFactionSystem _faction = default!;
|
||||
@@ -142,7 +139,7 @@ public sealed partial class DragonSystem : EntitySystem
|
||||
var xform = Transform(uid);
|
||||
|
||||
// Have to be on a grid fam
|
||||
if (!_mapManager.TryGetGrid(xform.GridUid, out var grid))
|
||||
if (!TryComp<MapGridComponent>(xform.GridUid, out var grid))
|
||||
{
|
||||
_popup.PopupEntity(Loc.GetString("carp-rift-anchor"), uid, uid);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user