Fix LatheMenu DefaultProductionAmount getting ignored (#35951)

This commit is contained in:
Tobias Berger
2025-03-20 17:38:59 +01:00
committed by GitHub
parent 09c7c6b7b4
commit 0d04f541d2

View File

@@ -68,21 +68,13 @@ public sealed partial class LatheMenu : DefaultWindow
{
ServerListButton.Visible = false;
}
AmountLineEdit.SetText(latheComponent.DefaultProductionAmount.ToString());
}
MaterialsList.SetOwner(Entity);
}
protected override void Opened()
{
base.Opened();
if (_entityManager.TryGetComponent<LatheComponent>(Entity, out var latheComp))
{
AmountLineEdit.SetText(latheComp.DefaultProductionAmount.ToString());
}
}
/// <summary>
/// Populates the list of all the recipes
/// </summary>