Intercom buffs and fixes (#29580)
* Intercom buffs and fixes * remove unused bui state * mild sec intercom buff * reinforce sec intercoms
This commit is contained in:
23
Content.Client/Radio/EntitySystems/RadioDeviceSystem.cs
Normal file
23
Content.Client/Radio/EntitySystems/RadioDeviceSystem.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using Content.Client.Radio.Ui;
|
||||
using Content.Shared.Radio;
|
||||
using Content.Shared.Radio.Components;
|
||||
using Robust.Client.GameObjects;
|
||||
|
||||
namespace Content.Client.Radio.EntitySystems;
|
||||
|
||||
public sealed class RadioDeviceSystem : EntitySystem
|
||||
{
|
||||
[Dependency] private readonly UserInterfaceSystem _ui = default!;
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override void Initialize()
|
||||
{
|
||||
SubscribeLocalEvent<IntercomComponent, AfterAutoHandleStateEvent>(OnAfterHandleState);
|
||||
}
|
||||
|
||||
private void OnAfterHandleState(Entity<IntercomComponent> ent, ref AfterAutoHandleStateEvent args)
|
||||
{
|
||||
if (_ui.TryGetOpenUi<IntercomBoundUserInterface>(ent.Owner, IntercomUiKey.Key, out var bui))
|
||||
bui.Update(ent);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user