Fix manual valve (#6532)

This commit is contained in:
Leon Friedrich 2022-02-10 19:21:57 +13:00 committed by GitHub
parent 706ac6af40
commit 9942da031a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 5 deletions

View File

@ -38,20 +38,22 @@ namespace Content.Server.NodeContainer.Nodes
public void AddAlwaysReachable(PipeNode pipeNode)
{
if (NodeGroup == null) return;
if (pipeNode.NodeGroupID != NodeGroupID) return;
_alwaysReachable ??= new();
_alwaysReachable.Add(pipeNode);
EntitySystem.Get<NodeGroupSystem>().QueueRemakeGroup((BaseNodeGroup) NodeGroup);
if (NodeGroup != null)
EntitySystem.Get<NodeGroupSystem>().QueueRemakeGroup((BaseNodeGroup) NodeGroup);
}
public void RemoveAlwaysReachable(PipeNode pipeNode)
{
if (_alwaysReachable == null) return;
if (NodeGroup == null) return;
if (pipeNode.NodeGroupID != NodeGroupID) return;
_alwaysReachable.Remove(pipeNode);
EntitySystem.Get<NodeGroupSystem>().QueueRemakeGroup((BaseNodeGroup) NodeGroup);
if (NodeGroup != null)
EntitySystem.Get<NodeGroupSystem>().QueueRemakeGroup((BaseNodeGroup) NodeGroup);
}
/// <summary>