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

@@ -1,6 +1,6 @@
using Content.Shared.Radio;
using Content.Shared.Radio.Components;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
namespace Content.Client.Radio.Ui;
@@ -19,7 +19,9 @@ public sealed class IntercomBoundUserInterface : BoundUserInterface
{
base.Open();
_menu = new();
var comp = EntMan.GetComponent<IntercomComponent>(Owner);
_menu = new((Owner, comp));
_menu.OnMicPressed += enabled =>
{
@@ -46,13 +48,8 @@ public sealed class IntercomBoundUserInterface : BoundUserInterface
_menu?.Close();
}
protected override void UpdateState(BoundUserInterfaceState state)
public void Update(Entity<IntercomComponent> ent)
{
base.UpdateState(state);
if (state is not IntercomBoundUIState msg)
return;
_menu?.Update(msg);
_menu?.Update(ent);
}
}