Show / Hide Table of Contents

Class Node

Organizes themselves into distinct INodeGroups with other Nodes that they can "reach" and have the same NodeGroupID.

Inheritance
System.Object
Node
ElectrocutionNode
AdjacentNode
PipeNode
TegNodeGenerator
CableDeviceNode
CableNode
CableTerminalPortNode
Namespace: Content.Server.NodeContainer.Nodes
Assembly: Content.Server.dll
Syntax
public abstract class Node : object

Fields

| Improve this Doc View Source

Deleting

Prevents a node from being used by other nodes while midway through removal.

Declaration
public bool Deleting
Field Value
Type Description
System.Boolean
| Improve this Doc View Source

Name

Name of this node on the owning NodeContainerComponent.

Declaration
public string Name
Field Value
Type Description
System.String
| Improve this Doc View Source

NodeGroup

The node group this node is a part of.

Declaration
public INodeGroup NodeGroup
Field Value
Type Description
INodeGroup
| Improve this Doc View Source

ReachableNodes

All compatible nodes that are reachable by this node. Effectively, active connections out of this node.

Declaration
public readonly HashSet<Node> ReachableNodes
Field Value
Type Description
HashSet<Node>

Properties

| Improve this Doc View Source

NeedAnchored

Declaration
public bool NeedAnchored { get; }
Property Value
Type Description
System.Boolean
| Improve this Doc View Source

NodeGroupID

An ID used as a criteria for combining into groups. Determines which INodeGroup implementation is used as a group, detailed in INodeGroupFactory.

Declaration
public NodeGroupID NodeGroupID { get; }
Property Value
Type Description
NodeGroupID
| Improve this Doc View Source

Owner

The entity that owns this node via its NodeContainerComponent.

Declaration
public EntityUid Owner { get; }
Property Value
Type Description
EntityUid

Methods

| Improve this Doc View Source

Connectable(IEntityManager, Nullable<TransformComponent>)

If this node should be considered for connection by other nodes.

Declaration
public virtual bool Connectable(IEntityManager entMan, TransformComponent? xform = null)
Parameters
Type Name Description
IEntityManager entMan
System.Nullable<TransformComponent> xform
Returns
Type Description
System.Boolean
| Improve this Doc View Source

GetReachableNodes(TransformComponent, EntityQuery<NodeContainerComponent>, EntityQuery<TransformComponent>, MapGridComponent, IEntityManager)

How this node will attempt to find other reachable Nodes to group with. Returns a set of Nodes to consider grouping with. Should not return this current Node.

Declaration
public abstract IEnumerable<Node> GetReachableNodes(TransformComponent xform, EntityQuery<NodeContainerComponent> nodeQuery, EntityQuery<TransformComponent> xformQuery, MapGridComponent grid, IEntityManager entMan)
Parameters
Type Name Description
TransformComponent xform
EntityQuery<NodeContainerComponent> nodeQuery
EntityQuery<TransformComponent> xformQuery
Robust.Shared.Map.Components.MapGridComponent grid
IEntityManager entMan
Returns
Type Description
IEnumerable<Node>
Remarks

The set of nodes returned can be asymmetrical (meaning that it can return other nodes whose GetReachableNodes(TransformComponent, EntityQuery<NodeContainerComponent>, EntityQuery<TransformComponent>, MapGridComponent, IEntityManager) does not return this node). If this is used, creation of a new node may not correctly merge networks unless both sides of this asymmetric relation are made to manually update with QueueReflood(Node).

| Improve this Doc View Source

Initialize(EntityUid, IEntityManager)

Invoked when the owning NodeContainerComponent is initialized.

Declaration
public virtual void Initialize(EntityUid owner, IEntityManager entMan)
Parameters
Type Name Description
EntityUid owner

The owning entity.

IEntityManager entMan
| Improve this Doc View Source

OnAnchorStateChanged(IEntityManager, Boolean)

Declaration
public virtual void OnAnchorStateChanged(IEntityManager entityManager, bool anchored)
Parameters
Type Name Description
IEntityManager entityManager
System.Boolean anchored
  • Improve this Doc
  • View Source
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾