force alert on alarmable, enforces synchronization with alarmables to be bounded by the tags that it can sync with

This commit is contained in:
vulppine
2022-08-22 05:01:31 -07:00
parent 550ea771a7
commit 85effbd33d
4 changed files with 107 additions and 45 deletions

View File

@@ -1,5 +1,7 @@
using Content.Shared.Atmos.Monitor;
using Content.Shared.Tag;
using Robust.Shared.Audio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Set;
namespace Content.Server.Atmos.Monitor.Components
{
@@ -41,12 +43,10 @@ namespace Content.Server.Atmos.Monitor.Components
public float AlarmVolume { get; set; } = -10;
/// <summary>
/// List of prototypes that this alarmable can
/// sync with - this is so that you can sync without
/// having to worry about cross-contamination.
/// List of tags to check for when synchronizing alarms.
/// </summary>
[DataField("syncWith")]
public List<string> SyncWithPrototypes { get; } = new();
[DataField("syncWith", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<TagPrototype>))]
public HashSet<string> SyncWithTags { get; } = new();
/// <summary>
/// If this device should receive only. If it can only