Files
Delta-v/Content.Client/_DV/PDA/ClientEventNotificationReceiverSystem.cs
T
pathetic meowmeow 3176645b53 Pagers (#5762)
* Pagers

* pagepage :]
2026-05-10 16:10:22 +02:00

26 lines
735 B
C#

using Content.Client.PDA;
using Content.Shared._DV.Pager;
using Content.Shared.PDA;
namespace Content.Client._DV.PDA;
public sealed class ClientEventNotificationReceiverSystem : EntitySystem
{
[Dependency] private readonly SharedUserInterfaceSystem _userInterface = default!;
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<PagerComponent, AfterAutoHandleStateEvent>(OnAfterAutoHandleState);
}
private void OnAfterAutoHandleState(Entity<PagerComponent> ent, ref AfterAutoHandleStateEvent args)
{
if (!_userInterface.TryGetOpenUi<PdaBoundUserInterface>(ent.Owner, PdaUiKey.Key, out var bui))
return;
bui.UpdateLinkedDevices();
}
}