Little NodeContainer ECS (#17702)
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Server.Atmos.Piping.Components;
|
||||
using Content.Server.Atmos.Piping.Unary.Components;
|
||||
using Content.Server.Cargo.Systems;
|
||||
using Content.Server.NodeContainer;
|
||||
using Content.Server.NodeContainer.EntitySystems;
|
||||
using Content.Server.NodeContainer.NodeGroups;
|
||||
using Content.Server.NodeContainer.Nodes;
|
||||
using Content.Server.Popups;
|
||||
@@ -29,6 +30,7 @@ public sealed class GasCanisterSystem : EntitySystem
|
||||
[Dependency] private readonly SharedHandsSystem _hands = default!;
|
||||
[Dependency] private readonly PopupSystem _popup = default!;
|
||||
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
||||
[Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
@@ -92,7 +94,7 @@ public sealed class GasCanisterSystem : EntitySystem
|
||||
string? tankLabel = null;
|
||||
var tankPressure = 0f;
|
||||
|
||||
if (nodeContainer.TryGetNode(canister.PortName, out PipeNode? portNode) && portNode.NodeGroup?.Nodes.Count > 1)
|
||||
if (_nodeContainer.TryGetNode(nodeContainer, canister.PortName, out PipeNode? portNode) && portNode.NodeGroup?.Nodes.Count > 1)
|
||||
portStatus = true;
|
||||
|
||||
if (containerManager.TryGetContainer(canister.ContainerName, out var tankContainer)
|
||||
@@ -165,7 +167,7 @@ public sealed class GasCanisterSystem : EntitySystem
|
||||
|| !TryComp<AppearanceComponent>(uid, out var appearance))
|
||||
return;
|
||||
|
||||
if (!nodeContainer.TryGetNode(canister.PortName, out PortablePipeNode? portNode))
|
||||
if (!_nodeContainer.TryGetNode(nodeContainer, canister.PortName, out PortablePipeNode? portNode))
|
||||
return;
|
||||
|
||||
if (portNode.NodeGroup is PipeNet {NodeCount: > 1} net)
|
||||
|
||||
Reference in New Issue
Block a user