Little NodeContainer ECS (#17702)

This commit is contained in:
faint
2023-06-28 14:28:38 +03:00
committed by GitHub
parent c25f3f08ed
commit 2f85b5ea3c
27 changed files with 143 additions and 88 deletions

View File

@@ -10,6 +10,7 @@ using Content.Server.Chemistry.EntitySystems;
using Content.Server.Climbing;
using Content.Server.Medical.Components;
using Content.Server.NodeContainer;
using Content.Server.NodeContainer.EntitySystems;
using Content.Server.NodeContainer.NodeGroups;
using Content.Server.NodeContainer.Nodes;
using Content.Server.Power.Components;
@@ -49,6 +50,7 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
[Dependency] private readonly MetaDataSystem _metaDataSystem = default!;
[Dependency] private readonly ReactiveSystem _reactiveSystem = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
public override void Initialize()
{
@@ -231,7 +233,7 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
if (!TryComp(uid, out NodeContainerComponent? nodeContainer))
return;
if (!nodeContainer.TryGetNode(cryoPod.PortName, out PortablePipeNode? portNode))
if (!_nodeContainer.TryGetNode(nodeContainer, cryoPod.PortName, out PortablePipeNode? portNode))
return;
if (!TryComp(uid, out CryoPodAirComponent? cryoPodAir))
@@ -254,7 +256,7 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
// If it's connected to a port, include the port side
if (TryComp(uid, out NodeContainerComponent? nodeContainer))
{
if(nodeContainer.TryGetNode(component.PortName, out PipeNode? port))
if (_nodeContainer.TryGetNode(nodeContainer, component.PortName, out PipeNode? port))
gasMixDict.Add(component.PortName, port.Air);
}
args.GasMixtures = gasMixDict;