Changes required for iconComponent engine PR (#16575)

This commit is contained in:
Leon Friedrich
2023-05-19 19:13:10 +12:00
committed by GitHub
parent 2f8f92d6d8
commit 4dd3a40828

View File

@@ -98,10 +98,12 @@ namespace Content.Client.Kitchen.UI
return;
}
// TODO just use sprite view
Texture? texture;
if (_entityManager.TryGetComponent(entity, out IconComponent? iconComponent))
{
texture = iconComponent.Icon?.Default;
texture = _entityManager.System<SpriteSystem>().GetIcon(iconComponent);
}
else if (_entityManager.TryGetComponent(entity, out SpriteComponent? spriteComponent))
{