diff --git a/Content.Server/DeviceNetwork/Systems/DeviceListSystem.cs b/Content.Server/DeviceNetwork/Systems/DeviceListSystem.cs index 97a0864a8b..4c73774f0c 100644 --- a/Content.Server/DeviceNetwork/Systems/DeviceListSystem.cs +++ b/Content.Server/DeviceNetwork/Systems/DeviceListSystem.cs @@ -1,4 +1,5 @@ -using Content.Server.DeviceNetwork.Components; +using System.Linq; +using Content.Server.DeviceNetwork.Components; using Content.Shared.Interaction; using JetBrains.Annotations; @@ -25,7 +26,10 @@ public sealed class DeviceListSystem : EntitySystem if (!merge) deviceList.Devices.Clear(); - deviceList.Devices.UnionWith(devices); + var devicesList = devices.ToList(); + deviceList.Devices.UnionWith(devicesList); + + RaiseLocalEvent(uid, new DeviceListUpdateEvent(devicesList)); } /// @@ -91,3 +95,13 @@ public sealed class DeviceListSystem : EntitySystem args.Cancel(); } } + +public sealed class DeviceListUpdateEvent : EntityEventArgs +{ + public DeviceListUpdateEvent(List devices) + { + Devices = devices; + } + + public List Devices { get; } +}