From ebdadfa53798abb075f94c08ef2e2ed17ad29f04 Mon Sep 17 00:00:00 2001 From: lowercasedonkey <lowercasedonkey@gmail.com> Date: Wed, 30 Jun 2021 18:36:41 -0400 Subject: [PATCH] sort clothing appearance by display name, not backend name --- src/interaction/siWardrobe.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/interaction/siWardrobe.js b/src/interaction/siWardrobe.js index b44a8df0f12..68eec330ac5 100644 --- a/src/interaction/siWardrobe.js +++ b/src/interaction/siWardrobe.js @@ -204,6 +204,7 @@ App.UI.SlaveInteract.wardrobe = function(slave, contentRefresh) { function clothingSelection() { const el = new DocumentFragment(); + /** @type {FC.Clothes[]} */ let array = []; for (const [key, object] of App.Data.clothes) { @@ -223,7 +224,7 @@ App.UI.SlaveInteract.wardrobe = function(slave, contentRefresh) { } // Sort - array = array.sort((a, b) => (a > b) ? 1 : -1); + array = array.sort((a, b) => (App.Data.clothes.get(a).name > App.Data.clothes.get(b).name) ? 1 : -1); const sortedMap = new Map([]); for (const name of array) { sortedMap.set(name, App.Data.clothes.get(name)); -- GitLab