Implanter draw rework (#32136)

* Initial commit

* Clean-up

* Fix ftl, new damage

* ftl fix for real

* Updates based on feedback

* Child implant fix

* Make the UI only open when implanter is in draw mode

* Review fixes

* shunting
This commit is contained in:
SlamBamActionman
2025-02-27 18:57:28 +01:00
committed by GitHub
parent 5fdf702e3c
commit 41c51e2905
11 changed files with 396 additions and 36 deletions

View File

@@ -0,0 +1,35 @@
using Content.Shared.Implants;
using Robust.Client.UserInterface;
using Robust.Shared.Prototypes;
namespace Content.Client.Implants.UI;
public sealed class DeimplantBoundUserInterface : BoundUserInterface
{
[Dependency] private readonly IPrototypeManager _protomanager = default!;
[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);
}
}
}