From 4ee734951455da15eedaf766cee1f64b48959702 Mon Sep 17 00:00:00 2001 From: Guillaume E <262623+quatre@users.noreply.github.com> Date: Sat, 27 Jan 2024 13:06:39 +0100 Subject: [PATCH] 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. --- Content.Client/Chemistry/UI/ReagentDispenserWindow.xaml.cs | 2 ++ 1 file changed, 2 insertions(+) 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) { -- 2.51.2