fixes firelock alarm sync, removes check condition for syncalerts packet receive when checking through the sent dictionary
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
- type: AtmosAlarmable
|
||||
syncWith:
|
||||
- FireAlarm
|
||||
- AirSensor
|
||||
- AirAlarm
|
||||
- type: ApcPowerReceiver
|
||||
- type: ExtensionCableReceiver
|
||||
- type: DeviceNetwork
|
||||
|
||||
Reference in New Issue
Block a user