Code Cleanup: Purge obsolete MapManager methods (#26279)
* GetGrid * GridExists * TryGetGrid
This commit is contained in:
@@ -4,15 +4,13 @@ using Content.Server.Power.Components;
|
||||
using Content.Server.Power.Nodes;
|
||||
using Content.Shared.Wires;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
|
||||
namespace Content.Server.Power.EntitySystems
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class CableVisSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
|
||||
|
||||
@@ -32,7 +30,7 @@ namespace Content.Server.Power.EntitySystems
|
||||
return;
|
||||
|
||||
var transform = Transform(uid);
|
||||
if (!_mapManager.TryGetGrid(transform.GridUid, out var grid))
|
||||
if (!TryComp<MapGridComponent>(transform.GridUid, out var grid))
|
||||
return;
|
||||
|
||||
var mask = WireVisDirFlags.None;
|
||||
|
||||
Reference in New Issue
Block a user