Remove Explicit GridId References (#8315)

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Acruid
2022-06-11 18:54:41 -07:00
committed by GitHub
parent 846321cebb
commit 4f9be42f40
131 changed files with 531 additions and 588 deletions

View File

@@ -335,7 +335,7 @@ namespace Content.Server.NodeContainer.EntitySystems
private IEnumerable<Node> GetCompatibleNodes(Node node, EntityQuery<TransformComponent> xformQuery, EntityQuery<NodeContainerComponent> nodeQuery)
{
var xform = xformQuery.GetComponent(node.Owner);
_mapManager.TryGetGrid(xform.GridID, out var grid);
_mapManager.TryGetGrid(xform.GridEntityId, out var grid);
if (!node.Connectable(EntityManager, xform))
yield break;

View File

@@ -56,7 +56,7 @@ namespace Content.Server.NodeContainer.NodeGroups
public bool Removed { get; set; } = false;
[ViewVariables]
protected GridId GridId { get; private set; }
protected EntityUid GridId { get; private set; }
/// <summary>
/// Network ID of this group for client-side debug visualization of nodes.
@@ -75,7 +75,7 @@ namespace Content.Server.NodeContainer.NodeGroups
public virtual void Initialize(Node sourceNode)
{
// TODO: Can we get rid of this GridId?
GridId = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(sourceNode.Owner).GridID;
GridId = IoCManager.Resolve<IEntityManager>().GetComponent<TransformComponent>(sourceNode.Owner).GridEntityId;
}
/// <summary>

View File

@@ -3,7 +3,6 @@ using Content.Server.Atmos;
using Content.Server.Atmos.EntitySystems;
using Content.Server.NodeContainer.Nodes;
using Content.Shared.Atmos;
using Robust.Shared.Map;
using Robust.Shared.Utility;
namespace Content.Server.NodeContainer.NodeGroups
@@ -23,7 +22,7 @@ namespace Content.Server.NodeContainer.NodeGroups
[ViewVariables] private AtmosphereSystem? _atmosphereSystem;
public GridId Grid => GridId;
public EntityUid Grid => GridId;
public override void Initialize(Node sourceNode)
{