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);
|
Reset(uid, component);
|
||||||
break;
|
break;
|
||||||
case SyncAlerts:
|
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,
|
if (!args.Data.TryGetValue(SyncAlerts,
|
||||||
out IReadOnlyDictionary<string, AtmosMonitorAlarmType>? alarms))
|
out IReadOnlyDictionary<string, AtmosMonitorAlarmType>? alarms))
|
||||||
{
|
{
|
||||||
@@ -119,7 +117,7 @@ namespace Content.Server.Atmos.Monitor.Systems
|
|||||||
|
|
||||||
foreach (var (key, alarm) in alarms)
|
foreach (var (key, alarm) in alarms)
|
||||||
{
|
{
|
||||||
if (component.NetworkAlarmStates.ContainsKey(key))
|
if (!component.NetworkAlarmStates.TryAdd(key, alarm))
|
||||||
{
|
{
|
||||||
component.NetworkAlarmStates[key] = alarm;
|
component.NetworkAlarmStates[key] = alarm;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
- type: AtmosAlarmable
|
- type: AtmosAlarmable
|
||||||
syncWith:
|
syncWith:
|
||||||
- FireAlarm
|
- FireAlarm
|
||||||
- AirSensor
|
- AirAlarm
|
||||||
- type: ApcPowerReceiver
|
- type: ApcPowerReceiver
|
||||||
- type: ExtensionCableReceiver
|
- type: ExtensionCableReceiver
|
||||||
- type: DeviceNetwork
|
- type: DeviceNetwork
|
||||||
|
|||||||
Reference in New Issue
Block a user