Files
crystall-punk-14/Content.Client/_CP14/Workbench/CP14WorkbenchBoundUserInterface.cs
Ed 37a4068334 CLA license update (#429)
* pupu

* Update LICENSE.TXT

* CLA

* CLA!

* Revert "CLA!"

This reverts commit f999e341a1.

* CLA2

* Update rsi.json

* CLA3

* Workbench sublicense
2024-08-29 18:23:33 +03:00

40 lines
1001 B
C#

/*
* This file is sublicensed under MIT License
* https://github.com/space-wizards/space-station-14/blob/master/LICENSE.TXT
*/
using Content.Shared._CP14.Workbench;
using Robust.Client.UserInterface;
namespace Content.Client._CP14.Workbench;
public sealed class CP14WorkbenchBoundUserInterface : BoundUserInterface
{
private CP14WorkbenchWindow? _window;
public CP14WorkbenchBoundUserInterface(EntityUid owner, Enum uiKey) : base(owner, uiKey)
{
}
protected override void Open()
{
base.Open();
_window = this.CreateWindow<CP14WorkbenchWindow>();
_window.OnCraft += entry => SendMessage(new CP14WorkbenchUiCraftMessage(entry.ProtoId));
}
protected override void UpdateState(BoundUserInterfaceState state)
{
base.UpdateState(state);
switch (state)
{
case CP14WorkbenchUiRecipesState recipesState:
_window?.UpdateRecipes(recipesState);
break;
}
}
}