Nullable grid Uid (#8798)

This commit is contained in:
Leon Friedrich
2022-06-20 12:14:35 +12:00
committed by GitHub
parent ef41cd5aa8
commit fa4c6f63f8
82 changed files with 318 additions and 242 deletions

View File

@@ -286,7 +286,7 @@ namespace Content.Server.NodeContainer.EntitySystems
private BaseNodeGroup InitGroup(Node node, List<Node> groupNodes)
{
var newGroup = (BaseNodeGroup) _nodeGroupFactory.MakeNodeGroup(node.NodeGroupID);
newGroup.Initialize(node);
newGroup.Initialize(node, EntityManager);
newGroup.NetId = _groupNetIdCounter++;
var netIdCounter = 0;
@@ -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.GridEntityId, out var grid);
_mapManager.TryGetGrid(xform.GridUid, out var grid);
if (!node.Connectable(EntityManager, xform))
yield break;