muffin v7.4.15
This commit is contained in:
parent
9bf3dbdf69
commit
0b1b2d38c7
14 changed files with 1215 additions and 1057 deletions
|
|
@ -13,6 +13,8 @@ using Dalamud.Interface.Windowing;
|
|||
using LLib.ImGui;
|
||||
using Questionable.Controller;
|
||||
using Questionable.Data;
|
||||
using Questionable.Functions;
|
||||
using Questionable.Model;
|
||||
using Questionable.Model.Questing;
|
||||
using Questionable.Windows.QuestComponents;
|
||||
|
||||
|
|
@ -28,17 +30,23 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
|
||||
private readonly MovementController _movementController;
|
||||
|
||||
private readonly QuestFunctions _questFunctions;
|
||||
|
||||
private readonly QuestData _questData;
|
||||
|
||||
private readonly TerritoryData _territoryData;
|
||||
|
||||
private int _cycleLimit;
|
||||
|
||||
public FateSelectionWindow(FateController fateController, FateDefinitionRegistry fateDefinitionRegistry, QuestController questController, MovementController movementController, TerritoryData territoryData)
|
||||
public FateSelectionWindow(FateController fateController, FateDefinitionRegistry fateDefinitionRegistry, QuestController questController, MovementController movementController, QuestFunctions questFunctions, QuestData questData, TerritoryData territoryData)
|
||||
: base("FATE Farming###QuestionableFateFarming")
|
||||
{
|
||||
_fateController = fateController;
|
||||
_fateDefinitionRegistry = fateDefinitionRegistry;
|
||||
_questController = questController;
|
||||
_movementController = movementController;
|
||||
_questFunctions = questFunctions;
|
||||
_questData = questData;
|
||||
_territoryData = territoryData;
|
||||
base.Size = new Vector2(600f, 400f);
|
||||
base.SizeCondition = ImGuiCond.FirstUseEver;
|
||||
|
|
@ -335,12 +343,31 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
|
||||
private void DrawFateRowActions(FateDefinition fate, bool disabled)
|
||||
{
|
||||
using (ImRaii.Disabled(disabled))
|
||||
bool flag = fate.RequiredQuestId.HasValue && !_questFunctions.IsQuestComplete(new QuestId(fate.RequiredQuestId.Value));
|
||||
ImU8String id = new ImU8String(5, 1);
|
||||
id.AppendLiteral("fate_");
|
||||
id.AppendFormatted(fate.Name);
|
||||
using (ImRaii.PushId(id))
|
||||
{
|
||||
ImU8String id = new ImU8String(5, 1);
|
||||
id.AppendLiteral("fate_");
|
||||
id.AppendFormatted(fate.Name);
|
||||
using (ImRaii.PushId(id))
|
||||
if (flag)
|
||||
{
|
||||
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||
{
|
||||
ImGui.TextColored(ImGuiColors.DalamudRed, FontAwesomeIcon.Times.ToIconString());
|
||||
}
|
||||
if (ImGui.IsItemHovered())
|
||||
{
|
||||
IQuestInfo questInfo;
|
||||
string value = (_questData.TryGetQuestInfo(new QuestId(fate.RequiredQuestId.Value), out questInfo) ? questInfo.Name : fate.RequiredQuestId.Value.ToString(CultureInfo.InvariantCulture));
|
||||
ImU8String tooltip = new ImU8String(33, 1);
|
||||
tooltip.AppendLiteral("Requires \"");
|
||||
tooltip.AppendFormatted(value);
|
||||
tooltip.AppendLiteral("\" to be completed first");
|
||||
ImGui.SetTooltip(tooltip);
|
||||
}
|
||||
return;
|
||||
}
|
||||
using (ImRaii.Disabled(disabled))
|
||||
{
|
||||
if (ImGuiComponents.IconButton(FontAwesomeIcon.Play))
|
||||
{
|
||||
|
|
@ -350,16 +377,16 @@ internal sealed class FateSelectionWindow : LWindow
|
|||
_fateController.Start(fate, cycleLimit);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (disabled && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
{
|
||||
if (_fateController.IsRunning)
|
||||
if (disabled && ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
|
||||
{
|
||||
ImGui.SetTooltip("Already farming a FATE");
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.SetTooltip("Stop quest automation first");
|
||||
if (_fateController.IsRunning)
|
||||
{
|
||||
ImGui.SetTooltip("Already farming a FATE");
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui.SetTooltip("Stop quest automation first");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ internal sealed class QuestWindow : LWindow, IPersistableWindowConfig
|
|||
{
|
||||
private static readonly Version PluginVersion = typeof(QuestionablePlugin).Assembly.GetName().Version;
|
||||
|
||||
private const string TestingSuffix = "";
|
||||
|
||||
private readonly IDalamudPluginInterface _pluginInterface;
|
||||
|
||||
private readonly QuestController _questController;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue