Properly dispose of stale pipedata chunks for the atmos monitor (#38974)

This commit is contained in:
Perry Fraser
2025-07-23 11:18:19 -04:00
committed by GitHub
parent c95bbfaf93
commit 002afe8056
4 changed files with 43 additions and 5 deletions

View File

@@ -162,10 +162,10 @@ public sealed partial class AtmosMonitoringConsoleNavMapControl : NavMapControl
{
var list = new List<AtmosMonitoringConsoleLine>();
foreach (var ((netId, layer, hexColor), atmosPipeData) in chunk.AtmosPipeData)
foreach (var ((netId, layer, pipeColor), atmosPipeData) in chunk.AtmosPipeData)
{
// Determine the correct coloration for the pipe
var color = Color.FromHex(hexColor) * _basePipeNetColor;
var color = pipeColor * _basePipeNetColor;
if (FocusNetId != null && FocusNetId != netId)
color *= _unfocusedPipeNetColor;