Missing nullables (#8634)

This commit is contained in:
Leon Friedrich
2022-06-04 19:17:48 +12:00
committed by GitHub
parent 31090b9c25
commit ca7960382b
59 changed files with 109 additions and 109 deletions

View File

@@ -156,7 +156,7 @@ namespace Content.Server.Atmos.Monitor.Systems
// the highest network alarm state at any time
if (!args.Data.TryGetValue(DeviceNetworkConstants.Command, out string? cmd)
|| !EntityManager.TryGetComponent(uid, out AtmosAlarmableComponent? alarmable)
|| !EntityManager.TryGetComponent(uid, out DeviceNetworkComponent netConn))
|| !EntityManager.TryGetComponent(uid, out DeviceNetworkComponent? netConn))
return;
// ignore packets from self, ignore from different frequency
@@ -342,7 +342,7 @@ namespace Content.Server.Atmos.Monitor.Systems
if (state == AtmosMonitorAlarmType.Danger) PlayAlertSound(uid, monitor);
if (EntityManager.TryGetComponent(monitor.Owner, out AtmosAlarmableComponent alarmable)
if (EntityManager.TryGetComponent(monitor.Owner, out AtmosAlarmableComponent? alarmable)
&& !alarmable.IgnoreAlarms)
RaiseLocalEvent(monitor.Owner, new AtmosMonitorAlarmEvent(monitor.LastAlarmState, monitor.HighestAlarmInNetwork));
// TODO: Central system that grabs *all* alarms from wired network