Add /craftretry
This commit is contained in:
@@ -118,6 +118,10 @@ public sealed class Plugin : IDalamudPlugin
|
||||
public void ExecuteSuggestedSynthHelperAction() =>
|
||||
SynthHelperWindow.ExecuteNextAction();
|
||||
|
||||
[Command(name: "/craftretry", description: "Clicks \"Retry\" in the synthesis helper. Can also be run inside a macro. This command is useful for controller players.")]
|
||||
public void ExecuteRetrySynthHelper() =>
|
||||
SynthHelperWindow.AttemptRetry();
|
||||
|
||||
[Command(name: "/craftimizer", description: "Open the settings window.")]
|
||||
private void OpenSettingsWindowForced() =>
|
||||
OpenSettingsWindow(true);
|
||||
|
||||
@@ -459,7 +459,7 @@ public sealed unsafe class SynthHelper : Window, IDisposable
|
||||
else
|
||||
{
|
||||
if (ImGui.Button("Retry", new(-1, 0)))
|
||||
CalculateBestMacro();
|
||||
AttemptRetry();
|
||||
if (ImGui.IsItemHovered())
|
||||
ImGuiUtils.TooltipWrapped("Suggest a way to finish the crafting recipe. " +
|
||||
"Results aren't perfect, and levels of success " +
|
||||
@@ -482,6 +482,12 @@ public sealed unsafe class SynthHelper : Window, IDisposable
|
||||
return false;
|
||||
}
|
||||
|
||||
public void AttemptRetry()
|
||||
{
|
||||
if (!SolverRunning)
|
||||
CalculateBestMacro();
|
||||
}
|
||||
|
||||
private void OnStartCrafting(ushort recipeId)
|
||||
{
|
||||
var shouldUpdateInput = false;
|
||||
|
||||
Reference in New Issue
Block a user