From 74c8d776b896af974bfce0da8c56e0ca5eb06f69 Mon Sep 17 00:00:00 2001 From: csqrb <56765288+CaptainSqrBeard@users.noreply.github.com> Date: Tue, 19 Nov 2024 01:49:21 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=B2=D0=BB=D0=B5=D0=BA=D0=B0?= =?UTF-8?q?=D0=B5=D0=BC=D1=8B=D0=B5=20=D1=87=D0=B5=D1=80=D1=82=D0=B5=D0=B6?= =?UTF-8?q?=D0=B8=20(#47)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ejectable blueprints * // Corvax-Next-BlueprintEject * // Corvax-Next-Something Co-authored-by: FN <37689533+FireNameFN@users.noreply.github.com> * Apply suggestions from code review --------- Co-authored-by: FN <37689533+FireNameFN@users.noreply.github.com> Co-authored-by: AwareFoxy <135021509+AwareFoxy@users.noreply.github.com> --- .../Lathe/UI/LatheBoundUserInterface.cs | 8 +++++ Content.Client/Lathe/UI/LatheMenu.xaml | 8 +++++ Content.Client/Lathe/UI/LatheMenu.xaml.cs | 17 +++++++++++ Content.Server/Lathe/LatheSystem.cs | 29 ++++++++++++++++++- Content.Shared/Lathe/LatheMessages.cs | 14 ++++++++- .../Research/Systems/BlueprintSystem.cs | 7 +++++ .../ru-RU/_corvaxnext/lathe/ui/lathe-menu.ftl | 1 + 7 files changed, 82 insertions(+), 2 deletions(-) create mode 100644 Resources/Locale/ru-RU/_corvaxnext/lathe/ui/lathe-menu.ftl diff --git a/Content.Client/Lathe/UI/LatheBoundUserInterface.cs b/Content.Client/Lathe/UI/LatheBoundUserInterface.cs index a599f79152e..d4c21ad372d 100644 --- a/Content.Client/Lathe/UI/LatheBoundUserInterface.cs +++ b/Content.Client/Lathe/UI/LatheBoundUserInterface.cs @@ -27,6 +27,13 @@ protected override void Open() SendMessage(new ConsoleServerSelectionMessage()); }; + // Corvax-Next-BlueprintEject-Start + _menu.OnBlueprintEjectButtonPressed += _ => + { + SendMessage(new LatheBlueprintEjectMessage()); + }; + // Corvax-Next-BlueprintEject-End + _menu.RecipeQueueAction += (recipe, amount) => { SendMessage(new LatheQueueRecipeMessage(recipe, amount)); @@ -42,6 +49,7 @@ protected override void UpdateState(BoundUserInterfaceState state) case LatheUpdateState msg: if (_menu != null) _menu.Recipes = msg.Recipes; + _menu?.UpdateBlueprintEjectButton(msg.HasAnyBlueprints); // Corvax-Next-BlueprintEject _menu?.PopulateRecipes(); _menu?.UpdateCategories(); _menu?.PopulateQueueList(msg.Queue); diff --git a/Content.Client/Lathe/UI/LatheMenu.xaml b/Content.Client/Lathe/UI/LatheMenu.xaml index 5b21f0bae66..70458f3974b 100644 --- a/Content.Client/Lathe/UI/LatheMenu.xaml +++ b/Content.Client/Lathe/UI/LatheMenu.xaml @@ -74,6 +74,14 @@ Orientation="Horizontal" Align="End" HorizontalExpand="True"> + + +