Fixes lathe usage of EntityPrototypeView (#29608)
Co-authored-by: plykiya <plykiya@protonmail.com>
This commit is contained in:
@@ -217,12 +217,12 @@ public sealed partial class LatheMenu : DefaultWindow
|
|||||||
queuedRecipeBox.Orientation = BoxContainer.LayoutOrientation.Horizontal;
|
queuedRecipeBox.Orientation = BoxContainer.LayoutOrientation.Horizontal;
|
||||||
|
|
||||||
var queuedRecipeProto = new EntityPrototypeView();
|
var queuedRecipeProto = new EntityPrototypeView();
|
||||||
|
queuedRecipeBox.AddChild(queuedRecipeProto);
|
||||||
if (_prototypeManager.TryIndex(recipe.Result, out EntityPrototype? entityProto) && entityProto != null)
|
if (_prototypeManager.TryIndex(recipe.Result, out EntityPrototype? entityProto) && entityProto != null)
|
||||||
queuedRecipeProto.SetPrototype(entityProto);
|
queuedRecipeProto.SetPrototype(entityProto);
|
||||||
|
|
||||||
var queuedRecipeLabel = new Label();
|
var queuedRecipeLabel = new Label();
|
||||||
queuedRecipeLabel.Text = $"{idx}. {recipe.Name}";
|
queuedRecipeLabel.Text = $"{idx}. {recipe.Name}";
|
||||||
queuedRecipeBox.AddChild(queuedRecipeProto);
|
|
||||||
queuedRecipeBox.AddChild(queuedRecipeLabel);
|
queuedRecipeBox.AddChild(queuedRecipeLabel);
|
||||||
QueueList.AddChild(queuedRecipeBox);
|
QueueList.AddChild(queuedRecipeBox);
|
||||||
idx++;
|
idx++;
|
||||||
|
|||||||
Reference in New Issue
Block a user