Class BaseNodeGroup
Inheritance
System.Object
BaseNodeGroup
Implements
Namespace: Content.Server.NodeContainer.NodeGroups
Assembly: Content.Server.dll
Syntax
public class BaseNodeGroup : object, INodeGroup
Fields
| Improve this Doc View SourceNetId
Network ID of this group for client-side debug visualization of nodes.
Declaration
public int NetId
Field Value
Type | Description |
---|---|
System.Int32 |
Nodes
The list of nodes in this group.
Declaration
public readonly List<Node> Nodes
Field Value
Type | Description |
---|---|
List<Node> |
Properties
| Improve this Doc View SourceGroupId
Declaration
public NodeGroupID GroupId { get; }
Property Value
Type | Description |
---|---|
NodeGroupID |
NodeCount
Declaration
public int NodeCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Remaking
Declaration
public bool Remaking { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Removed
Debug variable to indicate that this NodeGroup should not be being used by anything.
Declaration
public bool Removed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Methods
| Improve this Doc View SourceAfterRemake(IEnumerable<IGrouping<INodeGroup, Node>>)
Called after the nodes in this group have been made into one or more new groups.
Declaration
public virtual void AfterRemake(IEnumerable<IGrouping<INodeGroup, Node>> newGroups)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IGrouping<INodeGroup, Node>> | newGroups | A list of new groups for this group's former nodes. |
Remarks
Use this to split in-group data such as pipe gas mixtures into newly split nodes.
Create(NodeGroupID)
Declaration
public void Create(NodeGroupID groupId)
Parameters
Type | Name | Description |
---|---|---|
NodeGroupID | groupId |
GetDebugData()
Declaration
public virtual string? GetDebugData()
Returns
Type | Description |
---|---|
System.Nullable<System.String> |
Initialize(Node, IEntityManager)
Declaration
public virtual void Initialize(Node sourceNode, IEntityManager entMan)
Parameters
Type | Name | Description |
---|---|---|
Node | sourceNode | |
IEntityManager | entMan |
LoadNodes(List<Node>)
Called to load this newly created group up with new nodes.
Declaration
public virtual void LoadNodes(List<Node> groupNodes)
Parameters
Type | Name | Description |
---|---|---|
List<Node> | groupNodes | The new nodes for this group. |
RemoveNode(Node)
Called when a node has been removed from this group via deletion of the node.
Declaration
public virtual void RemoveNode(Node node)
Parameters
Type | Name | Description |
---|---|---|
Node | node | The node that was deleted. |
Remarks
Note that this always still results in a complete remake of the group later, but hooking this method is good for book keeping.
Explicit Interface Implementations
| Improve this Doc View SourceINodeGroup.Nodes
Declaration
IReadOnlyList<Node> INodeGroup.Nodes { get; }
Returns
Type | Description |
---|---|
IReadOnlyList<Node> |