Little NodeContainer ECS (#17702)
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Content.Server.Atmos.Piping.Binary.Components;
|
||||
using Content.Server.NodeContainer;
|
||||
using Content.Server.NodeContainer.EntitySystems;
|
||||
using Content.Server.NodeContainer.Nodes;
|
||||
using Content.Shared.Atmos.Piping;
|
||||
using Content.Shared.Audio;
|
||||
@@ -17,6 +18,7 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
|
||||
{
|
||||
[Dependency] private readonly SharedAmbientSoundSystem _ambientSoundSystem = default!;
|
||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
||||
[Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -55,8 +57,8 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
|
||||
{
|
||||
component.Open = value;
|
||||
if (TryComp(uid, out NodeContainerComponent? nodeContainer)
|
||||
&& nodeContainer.TryGetNode(component.InletName, out PipeNode? inlet)
|
||||
&& nodeContainer.TryGetNode(component.OutletName, out PipeNode? outlet))
|
||||
&& _nodeContainer.TryGetNode(nodeContainer, component.InletName, out PipeNode? inlet)
|
||||
&& _nodeContainer.TryGetNode(nodeContainer, component.OutletName, out PipeNode? outlet))
|
||||
{
|
||||
if (TryComp<AppearanceComponent>(component.Owner,out var appearance))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user