From: Guillaume E <262623+quatre@users.noreply.github.com> Date: Sat, 27 Jan 2024 12:06:39 +0000 (+0100) Subject: Keep reagent dispenser inventory ordered (#24304) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=4ee734951455da15eedaf766cee1f64b48959702;p=space-station-14.git Keep reagent dispenser inventory ordered (#24304) * 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. --- diff --git a/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs b/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs index 332de34345..a36cc2fe54 100644 --- a/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs +++ b/Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs @@ -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> entry in inventory) {