Show volume on the gas analyzer (#25720)
The gas analyzer now shows the volume of pipes, tanks, canisters and the environment. Adjust gas analyzers so that the volume and number of moles shown corresponds to only the scanned element, e.g. a canister or single pipe in a pipenet.
This commit is contained in:
@@ -151,10 +151,8 @@ namespace Content.Server.Atmos.Portable
|
||||
/// </summary>
|
||||
private void OnScrubberAnalyzed(EntityUid uid, PortableScrubberComponent component, GasAnalyzerScanEvent args)
|
||||
{
|
||||
args.GasMixtures ??= new Dictionary<string, GasMixture?> { { Name(uid), component.Air } };
|
||||
// If it's connected to a port, include the port side
|
||||
if (_nodeContainer.TryGetNode(uid, component.PortName, out PipeNode? port))
|
||||
args.GasMixtures.Add(component.PortName, port.Air);
|
||||
args.GasMixtures ??= new List<(string, GasMixture?)>();
|
||||
args.GasMixtures.Add((Name(uid), component.Air));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user