ApcNet updating fix (#3078)

* GridPowerComponent

* ApcNet Powered update bugfix

* PowerTest fix

* Add GridPower to Saltern

* test fix

* Update canceling cleanup

* code cleanup

* nullable & code cleanup for test

* undo power test nullable

* Replaces GridPowerSystem with ApcNetSystem

* build fix

* Update Content.Server/GameObjects/EntitySystems/ApcNetSystem.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
collinlunn
2021-02-17 06:51:30 -07:00
committed by GitHub
parent 55d65889ae
commit fabc580df9
5 changed files with 101 additions and 14 deletions

View File

@@ -36,6 +36,12 @@ namespace Content.Server.GameObjects.Components.NodeContainer.NodeGroups
[ViewVariables]
public int NodeCount => Nodes.Count;
/// <summary>
/// Debug variable to indicate that this NodeGroup should not be being used by anything.
/// </summary>
[ViewVariables]
public bool Removed { get; private set; } = false;
public static readonly INodeGroup NullGroup = new NullNodeGroup();
protected GridId GridId { get; private set;}
@@ -70,6 +76,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.NodeGroups
{
node.NodeGroup = newGroup;
}
Removed = true;
}
/// <summary>
@@ -92,6 +99,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.NodeGroups
}
}
AfterRemake(newGroups);
Removed = true;
}
protected virtual void OnAddNode(Node node) { }