Pipe visualizers (#3042)

* modifies pipe sprites to look not connected

* pipe connector sprites

* PipeConnectorVisualizer

* Remove pipe visualizer

* Revert "Remove pipe visualizer"

This reverts commit dc8da93f99f20aa55247c6a94d26c7a75a3d1782.

* PipeDirection can be set with the sprite updating correctly

* fixes meta files

* removes unused vent/scrubber directions

* OnConnectedDirectionsNeedsUpdating

* comments + OnConnectedDirectionsNeedsUpdating gets called

* fix connecteddirections bug

* Combines ConnectedDirections sent to visualizer

* fixes unconnected pipe sprites

* Adds PipeConnectorVisualizer to other piping entities

* code cleanup

* Fixed bug with ConnectedDirections not being set correctly

* diff fix

* rotation simplification

* Improves rsi serialization

* enable nullable

* wip

* visualizer cleanup

* nullable cleanup

Co-authored-by: py01 <pyronetics01@gmail.com>
This commit is contained in:
collinlunn
2021-02-22 19:18:30 -07:00
committed by GitHub
parent 6a79782fc0
commit 112f7d8346
26 changed files with 343 additions and 74 deletions

View File

@@ -36,7 +36,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
/// <summary>
/// If this node should be considered for connection by other nodes.
/// </summary>
private bool Connectable => !_deleting && Anchored;
public bool Connectable => !_deleting && Anchored;
private bool Anchored => !Owner.TryGetComponent<IPhysicsComponent>(out var physics) || physics.Anchored;
@@ -55,7 +55,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
Owner = owner;
}
public void OnContainerStartup()
public virtual void OnContainerStartup()
{
TryAssignGroupIfNeeded();
CombineGroupWithReachable();
@@ -82,7 +82,7 @@ namespace Content.Server.GameObjects.Components.NodeContainer.Nodes
}
}
public void OnContainerRemove()
public virtual void OnContainerRemove()
{
_deleting = true;
NodeGroup.RemoveNode(this);