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