]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Lathe menu UI displays a count of available recipes (#35570)
authorāda <ss.adasts@gmail.com>
Wed, 5 Mar 2025 12:31:48 +0000 (06:31 -0600)
committerGitHub <noreply@github.com>
Wed, 5 Mar 2025 12:31:48 +0000 (23:31 +1100)
* commit

* jumped the gun

* changes

Content.Client/Lathe/UI/LatheMenu.xaml
Content.Client/Lathe/UI/LatheMenu.xaml.cs
Resources/Locale/en-US/lathe/ui/lathe-menu.ftl

index 5b21f0bae66d0b3174c4aab8fc062c6487e405ed..d5e35731487acee18303f8c05adab9bf8e94502e 100644 (file)
@@ -59,6 +59,7 @@
                         PlaceHolder="0"
                         Text="1"
                         HorizontalExpand="True" />
+                    <Label Name="RecipeCount" Margin="8 0 8 0" MinWidth="90" Align="Right" />
                 </BoxContainer>
             </BoxContainer>
         </BoxContainer>
index 2b18ce28de957f77943f19f645eb77474374a974..e796259ead719c32556986ea1fce3320d257bdc9 100644 (file)
@@ -120,6 +120,8 @@ public sealed partial class LatheMenu : DefaultWindow
         if (!int.TryParse(AmountLineEdit.Text, out var quantity) || quantity <= 0)
             quantity = 1;
 
+        RecipeCount.Text = Loc.GetString("lathe-menu-recipe-count", ("count", recipesToShow.Count));
+
         var sortedRecipesToShow = recipesToShow.OrderBy(_lathe.GetRecipeName);
         RecipeList.Children.Clear();
         _entityManager.TryGetComponent(Entity, out LatheComponent? lathe);
index 16b67022ad516fbbacfa4a97c3de9ec901aa2738..907baf4ffc29501d061306923fa15053764a5f00 100644 (file)
@@ -6,6 +6,10 @@ lathe-menu-search-designs = Search designs
 lathe-menu-category-all = All
 lathe-menu-search-filter = Filter:
 lathe-menu-amount = Amount:
+lathe-menu-recipe-count = { $count ->
+    [1] {$count} Recipe
+    *[other] {$count} Recipes
+}
 lathe-menu-reagent-slot-examine = It has a slot for a beaker on the side.
 lathe-reagent-dispense-no-container = Liquid pours out of {THE($name)} onto the floor!
 lathe-menu-result-reagent-display = {$reagent} ({$amount}u)