Fix cargo request computer category sorting (#11147)

* Revert "Automatic changelog update"

This reverts commit 18f714efce.

* Fix cargo request computer category sorting
This commit is contained in:
Visne
2022-09-10 05:14:17 +02:00
committed by GitHub
parent 21da7b1edf
commit e1a0de3bcf

View File

@@ -99,8 +99,6 @@ namespace Content.Client.Cargo.UI
_categoryStrings.Clear();
Categories.Clear();
_categoryStrings.Add(Loc.GetString("cargo-console-menu-populate-categories-all-text"));
foreach (var prototype in ProductPrototypes)
{
if (!_categoryStrings.Contains(prototype.Category))
@@ -108,7 +106,12 @@ namespace Content.Client.Cargo.UI
_categoryStrings.Add(Loc.GetString(prototype.Category));
}
}
_categoryStrings.Sort();
// Add "All" category at the top of the list
_categoryStrings.Insert(0, Loc.GetString("cargo-console-menu-populate-categories-all-text"));
foreach (var str in _categoryStrings)
{
Categories.AddItem(str);