Remove last component.Name calls (#13593)

This commit is contained in:
metalgearsloth
2023-01-19 13:57:18 +11:00
committed by GitHub
parent c6d3e4f3bd
commit 1b0e50ae19
11 changed files with 19 additions and 14 deletions

View File

@@ -109,11 +109,12 @@ namespace Content.Client.Body.UI
_bodyPartsList.Clear();
var bodySystem = IoCManager.Resolve<IEntitySystemManager>().GetEntitySystem<SharedBodySystem>();
var factory = IoCManager.Resolve<IComponentFactory>();
var i = 0;
foreach (var part in bodySystem.GetBodyChildren(_currentEntity))
{
_bodyPartsList[i++] = part.Component.ParentSlot!;
BodyPartList.AddItem(Loc.GetString(part.Component.Name));
BodyPartList.AddItem(Loc.GetString(factory.GetComponentName(part.Component.GetType())));
}
}