alarmables now check if the type of alarm matches the alarms they can check (optional)

This commit is contained in:
vulppine
2022-08-22 11:30:37 -07:00
parent a3909f0aaf
commit 84027b4e67
4 changed files with 26 additions and 10 deletions

View File

@@ -1,3 +1,4 @@
using System.Linq;
using Content.Server.Atmos.Monitor.Components;
using Content.Server.Atmos.EntitySystems;
using Content.Server.Atmos.Piping.EntitySystems;
@@ -31,8 +32,8 @@ namespace Content.Server.Atmos.Monitor.Systems
// Commands
public const string AtmosMonitorSetThresholdCmd = "atmos_monitor_set_threshold";
// Packet data
public const string AlertTypes = "atmos_monitor_alert_types";
public const string AtmosMonitorThresholdData = "atmos_monitor_threshold_data";
@@ -315,6 +316,11 @@ namespace Content.Server.Atmos.Monitor.Systems
[AtmosAlarmableSystem.AlertSource] = tags.Tags
};
if (alarms != null)
{
payload.Add(AtmosAlarmableSystem.AlertTypes, alarms.ToHashSet());
}
foreach (var addr in monitor.RegisteredDevices)
{
_deviceNetSystem.QueuePacket(monitor.Owner, addr, payload);