diff --git a/Content.Server/Atmos/Monitor/Systems/FireAlarmSystem.cs b/Content.Server/Atmos/Monitor/Systems/FireAlarmSystem.cs index 981bbe012f..1d72aa8ff7 100644 --- a/Content.Server/Atmos/Monitor/Systems/FireAlarmSystem.cs +++ b/Content.Server/Atmos/Monitor/Systems/FireAlarmSystem.cs @@ -1,5 +1,6 @@ using Content.Server.AlertLevel; using Content.Server.Atmos.Monitor.Components; +using Content.Server.DeviceNetwork.Systems; using Content.Server.Power.Components; using Content.Server.Power.EntitySystems; using Content.Shared.AlertLevel; @@ -12,15 +13,23 @@ namespace Content.Server.Atmos.Monitor.Systems { public sealed class FireAlarmSystem : EntitySystem { + [Dependency] private readonly AtmosDeviceNetworkSystem _atmosDevNet = default!; [Dependency] private readonly AtmosAlarmableSystem _atmosAlarmable = default!; [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!; public override void Initialize() { SubscribeLocalEvent(OnInteractHand); + SubscribeLocalEvent(OnDeviceListSync); SubscribeLocalEvent(OnEmagged); } + private void OnDeviceListSync(EntityUid uid, FireAlarmComponent component, DeviceListUpdateEvent args) + { + _atmosDevNet.Register(uid, null); + _atmosDevNet.Sync(uid, null); + } + private void OnInteractHand(EntityUid uid, FireAlarmComponent component, InteractHandEvent args) { if (!_interactionSystem.InRangeUnobstructed(args.User, args.Target)) diff --git a/Resources/Prototypes/Entities/Structures/Wallmounts/fire_alarm.yml b/Resources/Prototypes/Entities/Structures/Wallmounts/fire_alarm.yml index 0adbd8e2c5..73b2b80189 100644 --- a/Resources/Prototypes/Entities/Structures/Wallmounts/fire_alarm.yml +++ b/Resources/Prototypes/Entities/Structures/Wallmounts/fire_alarm.yml @@ -13,6 +13,8 @@ deviceNetId: AtmosDevices receiveFrequencyId: AtmosMonitor transmitFrequencyId: AtmosMonitor + sendBroadcastAttemptEvent: true + - type: DeviceList - type: ApcNetworkConnection - type: AtmosMonitor monitorFire: true