Remove cryo pod component references (#15247)

This commit is contained in:
DrSmugleaf
2023-04-09 15:28:19 -07:00
committed by GitHub
parent ec28358e06
commit 66adf34f59
8 changed files with 40 additions and 44 deletions

View File

@@ -110,7 +110,7 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
}
}
public override void EjectBody(EntityUid uid, SharedCryoPodComponent? cryoPodComponent)
public override void EjectBody(EntityUid uid, CryoPodComponent? cryoPodComponent)
{
if (!Resolve(uid, ref cryoPodComponent))
return;
@@ -221,17 +221,24 @@ public sealed partial class CryoPodSystem: SharedCryoPodSystem
if (!nodeContainer.TryGetNode(cryoPod.PortName, out PortablePipeNode? portNode))
return;
_atmosphereSystem.React(cryoPod.Air, portNode);
if (!TryComp(uid, out CryoPodAirComponent? cryoPodAir))
return;
_atmosphereSystem.React(cryoPodAir.Air, portNode);
if (portNode.NodeGroup is PipeNet {NodeCount: > 1} net)
{
_gasCanisterSystem.MixContainerWithPipeNet(cryoPod.Air, net.Air);
_gasCanisterSystem.MixContainerWithPipeNet(cryoPodAir.Air, net.Air);
}
}
private void OnGasAnalyzed(EntityUid uid, CryoPodComponent component, GasAnalyzerScanEvent args)
{
var gasMixDict = new Dictionary<string, GasMixture?> { { Name(uid), component.Air } };
if (!TryComp(uid, out CryoPodAirComponent? cryoPodAir))
return;
var gasMixDict = new Dictionary<string, GasMixture?> { { Name(uid), cryoPodAir.Air } };
// If it's connected to a port, include the port side
if (TryComp(uid, out NodeContainerComponent? nodeContainer))
{