Add /craftaction command

This commit is contained in:
Asriel Camora
2023-11-28 15:16:11 -08:00
parent 81d6509008
commit 83e276f884
2 changed files with 25 additions and 3 deletions
+8
View File
@@ -78,6 +78,10 @@ public sealed class Plugin : IDalamudPlugin
{
HelpMessage = "Open the crafting macro editor.",
});
Service.CommandManager.AddHandler("/craftaction", new CommandInfo((_, _) => ExecuteSuggestedSynthHelperAction())
{
HelpMessage = "Execute the suggested action in the synthesis helper. This command mostly exists for controller players.",
});
}
public (CharacterStats? Character, RecipeData? Recipe, MacroEditor.CrafterBuffs? Buffs) GetOpenedStats()
@@ -122,6 +126,9 @@ public sealed class Plugin : IDalamudPlugin
EditorWindow = new(characterStats, recipeData, buffs, actions, setter);
}
public void ExecuteSuggestedSynthHelperAction() =>
SynthHelperWindow.QueueSuggestedActionExecution();
public void OpenSettingsWindow()
{
if (SettingsWindow.IsOpen ^= true)
@@ -159,6 +166,7 @@ public sealed class Plugin : IDalamudPlugin
Service.CommandManager.RemoveHandler("/craftimizer");
Service.CommandManager.RemoveHandler("/craftmacros");
Service.CommandManager.RemoveHandler("/crafteditor");
Service.CommandManager.RemoveHandler("/craftaction");
SettingsWindow.Dispose();
RecipeNoteWindow.Dispose();
SynthHelperWindow.Dispose();