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:
Nemanja
2024-07-07 10:19:10 -04:00
committed by GitHub
parent 063c5de985
commit 0e9ed36b85
22 changed files with 338 additions and 136 deletions

View 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);
}
}