From 11abfba74ab955a46172d695844d6d033da005db Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT Date: Sat, 16 Nov 2024 14:33:22 -0800 Subject: [PATCH 1/2] fix subcategories not being found --- Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs index 3f526981a4e..57e13821077 100644 --- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs @@ -2289,7 +2289,11 @@ private Dictionary CreateTree(List cat return match; foreach (var subcategory in parent.Contents.Where(c => c is NeoTabContainer).Cast()) - match = FindCategory(id, subcategory); + { + var res = FindCategory(id, subcategory); + if (res != null) + match ??= res; + } return match; } From 1473f39dfb506d5d52b8342bcd3a355a698c31c8 Mon Sep 17 00:00:00 2001 From: DEATHB4DEFEAT Date: Sat, 16 Nov 2024 15:27:02 -0800 Subject: [PATCH 2/2] shrimplify --- Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs index 57e13821077..c4e1e1fc13b 100644 --- a/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs +++ b/Content.Client/Lobby/UI/HumanoidProfileEditor.xaml.cs @@ -2289,11 +2289,7 @@ private Dictionary CreateTree(List cat return match; foreach (var subcategory in parent.Contents.Where(c => c is NeoTabContainer).Cast()) - { - var res = FindCategory(id, subcategory); - if (res != null) - match ??= res; - } + match ??= FindCategory(id, subcategory); return match; }