Files
tbd-station-14/Content.Client/Implants/UI/DeimplantBoundUserInterface.cs
J 3c307f3b36 Various UI warnings cleanup (#36169)
* Various UI warnings cleanup

* Revert unnecessary change

* Redoing SpriteSystem as it's non-injectable

* Missed one

* Better entity instantiation

* General cleanup of warnings changes

* Wrong class name!
2025-04-10 20:47:05 +10:00

33 lines
823 B
C#

using Content.Shared.Implants;
using Robust.Client.UserInterface;
namespace Content.Client.Implants.UI;
public sealed class DeimplantBoundUserInterface : BoundUserInterface
{
[ViewVariables]
private DeimplantChoiceWindow? _window;
public DeimplantBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();
_window = this.CreateWindow<DeimplantChoiceWindow>();
_window.OnImplantChange += implant => SendMessage(new DeimplantChangeVerbMessage(implant));
}
public void UpdateState(Dictionary<string, string> implantList, string? implant)
{
if (_window != null)
{
_window.UpdateImplantList(implantList);
_window.UpdateState(implant);
}
}
}