Skip to content

Commit

Permalink
Fix multiplying colors of differing nullabilities (#32991)
Browse files Browse the repository at this point in the history
  • Loading branch information
chromiumboy authored Oct 25, 2024
1 parent d4da992 commit 5ff5a72
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ public void UpdateUI(EntityCoordinates? consoleCoords, AtmosAlertsComputerEntry[
if (!TryGetSensorRegionColor(regionOwner, alarmState, out var regionColor))
continue;

regionOverlay.Color = regionColor.Value;
regionOverlay.Color = regionColor;

var priority = (_trackedEntity == regionOwner) ? 999 : (int)alarmState;
prioritizedRegionOverlays.Add(regionOverlay, priority);
Expand Down Expand Up @@ -331,9 +331,9 @@ private void AddTrackedEntityToNavMap(AtmosAlertsDeviceNavMapData metaData, Atmo
NavMap.TrackedEntities[metaData.NetEntity] = blip;
}

private bool TryGetSensorRegionColor(NetEntity regionOwner, AtmosAlarmType alarmState, [NotNullWhen(true)] out Color? color)
private bool TryGetSensorRegionColor(NetEntity regionOwner, AtmosAlarmType alarmState, out Color color)
{
color = null;
color = Color.White;

var blip = GetBlipTexture(alarmState);

Expand Down

0 comments on commit 5ff5a72

Please sign in to comment.