]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Keep reagent dispenser inventory ordered (#24304)
authorGuillaume E <262623+quatre@users.noreply.github.com>
Sat, 27 Jan 2024 12:06:39 +0000 (13:06 +0100)
committerGitHub <noreply@github.com>
Sat, 27 Jan 2024 12:06:39 +0000 (04:06 -0800)
* Keep reagent dispenser inventory ordered

This way, reagents wont be "moving around" in the UI when juggling
jugs.

The reagent dispensers will also show what reagents their storage
slots contain if jugs are not labelled.

* Move sorting client-side

* Revert "Keep reagent dispenser inventory ordered"

This reverts commit 3a1fc2e36d593937d4ecc581ae5a617a273a9d1c.

Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs

index 332de34345c80721dee8b7356fe54328275ffdfc..a36cc2fe54f5b35989e5263eaf98dc39961b982f 100644 (file)
@@ -58,6 +58,8 @@ namespace Content.Client.Chemistry.UI
                 return;
 
             ChemicalList.Children.Clear();
+            //Sort inventory by reagentLabel
+            inventory.Sort((x, y) => x.Value.Key.CompareTo(y.Value.Key));
 
             foreach (KeyValuePair<string, KeyValuePair<string, string>> entry in inventory)
             {