Fix synth help stalling when crafting the same recipe

This commit is contained in:
Asriel Camora
2024-07-31 21:09:50 -07:00
parent e8be417d2f
commit d61d3a70bf
+6 -3
View File
@@ -124,13 +124,13 @@ public sealed unsafe class SynthHelper : Window, IDisposable
if (WasCalculatable)
SolverTask?.Cancel();
else if (Macro.Count == 0)
OnStateUpdated();
CurrentState = GetCurrentState();
}
if (Macro.Count == 0)
if (Macro.Count == 0 && ShouldOpen)
{
if (ShouldOpen != WasOpen || IsCollapsed != WasCollapsed)
OnStateUpdated();
CurrentState = GetCurrentState();
}
if (!ShouldOpen)
@@ -188,7 +188,10 @@ public sealed unsafe class SynthHelper : Window, IDisposable
var recipeId = (ushort)agent->ActiveCraftRecipeId;
if (agent->ActiveCraftRecipeId == 0)
{
RecipeData = null;
return false;
}
if (RecipeData?.RecipeId != agent->ActiveCraftRecipeId)
OnStartCrafting(recipeId);