fixes firelock alarm sync, removes check condition for syncalerts packet receive when checking through the sent dictionary

This commit is contained in:
vulppine
2022-08-22 07:29:43 -07:00
parent 374c62703b
commit a8bf2ccbb6
2 changed files with 2 additions and 4 deletions

View File

@@ -109,8 +109,6 @@ namespace Content.Server.Atmos.Monitor.Systems
Reset(uid, component);
break;
case SyncAlerts:
// Synchronize alerts, but only if they're already known by this monitor.
// This should help eliminate the chain effect, especially with
if (!args.Data.TryGetValue(SyncAlerts,
out IReadOnlyDictionary<string, AtmosMonitorAlarmType>? alarms))
{
@@ -119,7 +117,7 @@ namespace Content.Server.Atmos.Monitor.Systems
foreach (var (key, alarm) in alarms)
{
if (component.NetworkAlarmStates.ContainsKey(key))
if (!component.NetworkAlarmStates.TryAdd(key, alarm))
{
component.NetworkAlarmStates[key] = alarm;
}

View File

@@ -7,7 +7,7 @@
- type: AtmosAlarmable
syncWith:
- FireAlarm
- AirSensor
- AirAlarm
- type: ApcPowerReceiver
- type: ExtensionCableReceiver
- type: DeviceNetwork