Add anchored checks to GetReachableNodes() for power device nodes (#5760)

This commit is contained in:
Caj Jones
2021-12-13 00:45:54 -05:00
committed by GitHub
parent f110e28021
commit 41a9bb1efa
3 changed files with 12 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
using System.Collections.Generic;
using System.Collections.Generic;
using Content.Server.NodeContainer.Nodes;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
@@ -15,6 +15,9 @@ namespace Content.Server.Power.Nodes
{
public override IEnumerable<Node> GetReachableNodes()
{
if (!Anchored)
yield break;
var entMan = IoCManager.Resolve<IEntityManager>();
// If we're in an invalid grid, such as grid 0, we cannot connect to anything.