Fix solution EUIs (#20033)

This commit is contained in:
metalgearsloth
2023-09-12 14:35:30 +10:00
committed by GitHub
parent 748ca93f5c
commit f05f94fdc0
3 changed files with 8 additions and 9 deletions

View File

@@ -12,11 +12,9 @@ namespace Content.Client.Administration.UI.ManageSolutions
public sealed class EditSolutionsEui : BaseEui
{
private readonly EditSolutionsWindow _window;
private IEntityManager _entManager;
public EditSolutionsEui()
{
_entManager = IoCManager.Resolve<IEntityManager>();
_window = new EditSolutionsWindow();
_window.OnClose += () => SendMessage(new CloseEuiMessage());
}
@@ -36,7 +34,7 @@ namespace Content.Client.Administration.UI.ManageSolutions
public override void HandleState(EuiStateBase baseState)
{
var state = (EditSolutionsEuiState) baseState;
_window.SetTargetEntity(_entManager.GetEntity(state.Target));
_window.SetTargetEntity(state.Target);
_window.UpdateSolutions(state.Solutions);
_window.UpdateReagents();
}