makes monitoralerttypes actually nullable
This commit is contained in:
@@ -49,7 +49,7 @@ namespace Content.Server.Atmos.Monitor.Components
|
|||||||
public HashSet<string> SyncWithTags { get; } = new();
|
public HashSet<string> SyncWithTags { get; } = new();
|
||||||
|
|
||||||
[DataField("monitorAlertTypes")]
|
[DataField("monitorAlertTypes")]
|
||||||
public HashSet<AtmosMonitorThresholdType> MonitorAlertTypes { get; } = new();
|
public HashSet<AtmosMonitorThresholdType>? MonitorAlertTypes { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// If this device should receive only. If it can only
|
/// If this device should receive only. If it can only
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ namespace Content.Server.Atmos.Monitor.Systems
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args.Data.TryGetValue(AlertTypes, out HashSet<AtmosMonitorThresholdType>? types))
|
if (args.Data.TryGetValue(AlertTypes, out HashSet<AtmosMonitorThresholdType>? types) && component.MonitorAlertTypes != null)
|
||||||
{
|
{
|
||||||
isValid = types.Any(type => component.MonitorAlertTypes.Contains(type));
|
isValid = types.Any(type => component.MonitorAlertTypes.Contains(type));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user