* fix keyring * fix #1209 * fix #1116 * fix water, test reenable ambient loop * recipe categories in workbecnhes * Update CP14StoreWindow.xaml * refactor: review * Update CP14WorkbenchWindow.xaml.cs * Update SharedCP14MagicEnergySystem.cs * categorizize all recipes + some UI fix * Update round_end.yml --------- Co-authored-by: Tornado Tech <54727692+Tornado-Technology@users.noreply.github.com>
40 lines
999 B
C#
40 lines
999 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?.UpdateState(recipesState);
|
|
break;
|
|
}
|
|
}
|
|
}
|