Fix entity menu grouping and sorting (#24243)

* Group entity menu by the displayed name instead of by the prototype

* Sort entity menu by the displayed name (with label) in current culture
This commit is contained in:
Kot
2024-01-19 02:18:53 +04:00
committed by GitHub
parent 6931848f1d
commit 9b97c7f2f2
2 changed files with 6 additions and 2 deletions

View File

@@ -18,7 +18,7 @@ namespace Content.Client.ContextMenu.UI
{
if (GroupingContextMenuType == 0)
{
var newEntities = entities.GroupBy(e => Identity.Name(e, _entityManager) + (_entityManager.GetComponent<MetaDataComponent>(e).EntityPrototype?.ID ?? string.Empty)).ToList();
var newEntities = entities.GroupBy(e => Identity.Name(e, _entityManager)).ToList();
return newEntities.Select(grp => grp.ToList()).ToList();
}
else