fix lathe syncing and tweak ui (#17489)

This commit is contained in:
Nemanja
2023-06-20 02:39:35 -04:00
committed by GitHub
parent 763f6048f2
commit a01f26d3a6
12 changed files with 64 additions and 83 deletions

View File

@@ -29,16 +29,15 @@ namespace Content.Client.Lathe.UI
_menu.OnQueueButtonPressed += _ =>
{
_queueMenu.OpenCenteredLeft();
if (_queueMenu.IsOpen)
_queueMenu.Close();
else
_queueMenu.OpenCenteredLeft();
};
_menu.OnServerListButtonPressed += _ =>
{
SendMessage(new ConsoleServerSelectionMessage());
};
_menu.OnServerSyncButtonPressed += _ =>
{
SendMessage(new ConsoleServerSyncMessage());
};
_menu.RecipeQueueAction += (recipe, amount) =>
{
SendMessage(new LatheQueueRecipeMessage(recipe, amount));
@@ -56,7 +55,7 @@ namespace Content.Client.Lathe.UI
case LatheUpdateState msg:
if (_menu != null)
_menu.Recipes = msg.Recipes;
_menu?.PopulateRecipes(Owner.Owner);
_menu?.PopulateRecipes(Lathe);
_menu?.PopulateMaterials(Lathe);
_queueMenu?.PopulateList(msg.Queue);
_queueMenu?.SetInfo(msg.CurrentlyProducing);