lathe recipes no longer specify textures (#12944)
Co-authored-by: Moony <moony@hellomouse.net>
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Content.Client.Lathe.UI
|
||||
[Dependency] private readonly IEntityManager _entityManager = default!;
|
||||
private readonly SpriteSystem _spriteSystem;
|
||||
|
||||
public LatheQueueMenu(LatheBoundUserInterface owner)
|
||||
public LatheQueueMenu()
|
||||
{
|
||||
RobustXamlLoader.Load(this);
|
||||
IoCManager.InjectDependencies(this);
|
||||
@@ -26,7 +26,9 @@ namespace Content.Client.Lathe.UI
|
||||
{
|
||||
if (recipe != null)
|
||||
{
|
||||
Icon.Texture = _spriteSystem.Frame0(recipe.Icon);
|
||||
Icon.Texture = recipe.Icon == null
|
||||
? _spriteSystem.GetPrototypeIcon(recipe.Result).Default
|
||||
: _spriteSystem.Frame0(recipe.Icon);
|
||||
NameLabel.Text = recipe.Name;
|
||||
Description.Text = recipe.Description;
|
||||
}
|
||||
@@ -44,7 +46,10 @@ namespace Content.Client.Lathe.UI
|
||||
var idx = 1;
|
||||
foreach (var recipe in queue)
|
||||
{
|
||||
QueueList.AddItem($"{idx}. {recipe.Name}", _spriteSystem.Frame0(recipe.Icon));
|
||||
var icon =recipe.Icon == null
|
||||
? _spriteSystem.GetPrototypeIcon(recipe.Result).Default
|
||||
: _spriteSystem.Frame0(recipe.Icon);
|
||||
QueueList.AddItem($"{idx}. {recipe.Name}", icon);
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user