Changeling cleanup and bugfix (#39843)

* fixes and cleanup

* key
This commit is contained in:
slarticodefast
2025-08-24 15:50:19 +02:00
committed by GitHub
parent 91a4cee6e1
commit 30aa61c29c
10 changed files with 91 additions and 81 deletions

View File

@@ -0,0 +1,35 @@
using Content.Shared.Changeling.Systems;
using JetBrains.Annotations;
using Robust.Client.UserInterface;
namespace Content.Client.Changeling.UI;
[UsedImplicitly]
public sealed partial class ChangelingTransformBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey)
{
private ChangelingTransformMenu? _window;
protected override void Open()
{
base.Open();
_window = this.CreateWindow<ChangelingTransformMenu>();
_window.OnIdentitySelect += SendIdentitySelect;
_window.Update(Owner);
}
public override void Update()
{
if (_window == null)
return;
_window.Update(Owner);
}
public void SendIdentitySelect(NetEntity identityId)
{
SendPredictedMessage(new ChangelingTransformIdentitySelectMessage(identityId));
}
}