muffin v6.12

This commit is contained in:
alydev 2025-10-09 07:53:51 +10:00
parent 060278c1b7
commit 155fbee291
59 changed files with 40083 additions and 58104 deletions

View file

@ -110,22 +110,6 @@ internal sealed class DebugConfigComponent : ConfigComponent
}
ImGui.SameLine();
ImGuiComponents.HelpMarker("When enabled, Questionable will not attempt to turn-in and complete quests. This will do everything automatically except the final turn-in step.");
bool v11 = base.Configuration.Advanced.ShowWindowOnStart;
if (ImGui.Checkbox("Show window on start", ref v11))
{
base.Configuration.Advanced.ShowWindowOnStart = v11;
Save();
}
ImGui.SameLine();
ImGuiComponents.HelpMarker("When enabled, Questionable's progress window will show when the plugin is loaded.");
bool v12 = base.Configuration.Advanced.StartMinimized;
if (ImGui.Checkbox("Start minimized", ref v12))
{
base.Configuration.Advanced.StartMinimized = v12;
Save();
}
ImGui.SameLine();
ImGuiComponents.HelpMarker("When enabled, Questionable's progress window will be in its minimized state when loaded.");
}
}
}

View file

@ -127,21 +127,27 @@ internal sealed class GeneralConfigComponent : ConfigComponent
base.Configuration.General.ShowIncompleteSeasonalEvents = v3;
Save();
}
bool v4 = base.Configuration.General.HideSeasonalEventsFromJournalProgress;
if (ImGui.Checkbox("Hide Seasonal Events from Journal Progress", ref v4))
{
base.Configuration.General.HideSeasonalEventsFromJournalProgress = v4;
Save();
}
}
ImGui.Separator();
ImGui.Text("Questing");
using (ImRaii.PushIndent())
{
bool v4 = base.Configuration.General.ConfigureTextAdvance;
if (ImGui.Checkbox("Automatically configure TextAdvance with the recommended settings", ref v4))
bool v5 = base.Configuration.General.ConfigureTextAdvance;
if (ImGui.Checkbox("Automatically configure TextAdvance with the recommended settings", ref v5))
{
base.Configuration.General.ConfigureTextAdvance = v4;
base.Configuration.General.ConfigureTextAdvance = v5;
Save();
}
bool v5 = base.Configuration.General.SkipLowPriorityDuties;
if (ImGui.Checkbox("Unlock certain optional dungeons and raids (instead of waiting for completion)", ref v5))
bool v6 = base.Configuration.General.SkipLowPriorityDuties;
if (ImGui.Checkbox("Unlock certain optional dungeons and raids (instead of waiting for completion)", ref v6))
{
base.Configuration.General.SkipLowPriorityDuties = v5;
base.Configuration.General.SkipLowPriorityDuties = v6;
Save();
}
ImGui.SameLine();
@ -169,10 +175,10 @@ internal sealed class GeneralConfigComponent : ConfigComponent
}
}
ImGui.Spacing();
bool v6 = base.Configuration.General.AutoStepRefreshEnabled;
if (ImGui.Checkbox("Automatically refresh quest steps when stuck (WIP see tooltip)", ref v6))
bool v7 = base.Configuration.General.AutoStepRefreshEnabled;
if (ImGui.Checkbox("Automatically refresh quest steps when stuck", ref v7))
{
base.Configuration.General.AutoStepRefreshEnabled = v6;
base.Configuration.General.AutoStepRefreshEnabled = v7;
Save();
}
ImGui.SameLine();
@ -186,23 +192,22 @@ internal sealed class GeneralConfigComponent : ConfigComponent
{
ImGui.Text("Questionable will automatically refresh a quest step if it appears to be stuck after the configured delay.");
ImGui.Text("This helps resume automated quest completion when interruptions occur.");
ImGui.Text("WIP feature, rather than remove it, this is a warning that it isn't fully complete.");
}
}
using (ImRaii.Disabled(!v6))
using (ImRaii.Disabled(!v7))
{
ImGui.Indent();
int v7 = base.Configuration.General.AutoStepRefreshDelaySeconds;
int v8 = base.Configuration.General.AutoStepRefreshDelaySeconds;
ImGui.SetNextItemWidth(150f);
if (ImGui.SliderInt("Refresh delay (seconds)", ref v7, 10, 180))
if (ImGui.SliderInt("Refresh delay (seconds)", ref v8, 10, 180))
{
base.Configuration.General.AutoStepRefreshDelaySeconds = v7;
base.Configuration.General.AutoStepRefreshDelaySeconds = v8;
Save();
}
Vector4 col = new Vector4(0.7f, 0.7f, 0.7f, 1f);
ImU8String text = new ImU8String(77, 1);
text.AppendLiteral("Quest steps will refresh automatically after ");
text.AppendFormatted(v7);
text.AppendFormatted(v8);
text.AppendLiteral(" seconds if no progress is made.");
ImGui.TextColored(in col, text);
ImGui.Unindent();

View file

@ -85,8 +85,8 @@ internal sealed class PluginConfigComponent : ConfigComponent
num = 0;
span[num] = new PluginDetailInfo("'Auto Active Time Maneuver' enabled", "Automatically completes active time maneuvers in\nsingle player instances, trials and raids\"", () => pandorasBoxIpc.IsAutoActiveTimeManeuverEnabled);
array[1] = new PluginInfo("Pandora's Box", "PandorasBox", "Pandora's Box is a collection of tweaks.", websiteUri2, dalamudRepositoryUri2, "/pandora", list2);
array[2] = new PluginInfo("NotificationMaster", "NotificationMaster", "Sends a configurable out-of-game notification if a quest\nrequires manual actions.", new Uri("https://github.com/NightmareXIV/NotificationMaster"), null);
array[3] = new PluginInfo("Artisan", "Artisan", "Automates crafting", new Uri("https://github.com/PunishXIV/Artisan"), new Uri("https://puni.sh/api/plugins"), "/artisan");
array[2] = new PluginInfo("QuestMap", "QuestMap", "Displays quest objectives and markers on the map for\nbetter navigation and tracking.", new Uri("https://github.com/rreminy/QuestMap"), null);
array[3] = new PluginInfo("NotificationMaster", "NotificationMaster", "Sends a configurable out-of-game notification if a quest\nrequires manual actions.", new Uri("https://github.com/NightmareXIV/NotificationMaster"), null);
_recommendedPlugins = new global::_003C_003Ez__ReadOnlyArray<PluginInfo>(array);
}
@ -129,10 +129,10 @@ internal sealed class PluginConfigComponent : ConfigComponent
ImGui.Spacing();
ImGui.Separator();
ImGui.Spacing();
ImGui.Text("Questionable recommends Boss Mod (VBM) for rotation/combat automation.");
using (ImRaii.Disabled(_combatController.IsRunning))
ImGui.Text("Questionable supports multiple rotation/combat plugins, please pick the one\nyou want to use:");
using (ImRaii.PushIndent())
{
using (ImRaii.PushIndent())
using (ImRaii.Disabled(_combatController.IsRunning))
{
if (ImGui.RadioButton("No rotation/combat plugin (combat must be done manually)", _configuration.General.CombatModule == Questionable.Configuration.ECombatModule.None))
{
@ -141,10 +141,6 @@ internal sealed class PluginConfigComponent : ConfigComponent
}
allRequiredInstalled &= DrawCombatPlugin(Questionable.Configuration.ECombatModule.BossMod, checklistPadding);
allRequiredInstalled &= DrawCombatPlugin(Questionable.Configuration.ECombatModule.WrathCombo, checklistPadding);
}
ImGui.Text("The following rotation/combat plugin(s) are provided for compatibility and testing purposes:");
using (ImRaii.PushIndent())
{
allRequiredInstalled &= DrawCombatPlugin(Questionable.Configuration.ECombatModule.RotationSolverReborn, checklistPadding);
}
}

View file

@ -25,22 +25,28 @@ internal sealed class StopConditionComponent : ConfigComponent
private readonly QuestRegistry _questRegistry;
private readonly QuestFunctions _questFunctions;
private readonly QuestTooltipComponent _questTooltipComponent;
private readonly UiUtils _uiUtils;
private readonly IClientState _clientState;
public StopConditionComponent(IDalamudPluginInterface pluginInterface, QuestSelector questSelector, QuestFunctions questFunctions, QuestRegistry questRegistry, QuestTooltipComponent questTooltipComponent, UiUtils uiUtils, IClientState clientState, Configuration configuration)
private readonly QuestController _questController;
public StopConditionComponent(IDalamudPluginInterface pluginInterface, QuestSelector questSelector, QuestFunctions questFunctions, QuestRegistry questRegistry, QuestTooltipComponent questTooltipComponent, UiUtils uiUtils, IClientState clientState, QuestController questController, Configuration configuration)
: base(pluginInterface, configuration)
{
StopConditionComponent stopConditionComponent = this;
_pluginInterface = pluginInterface;
_questSelector = questSelector;
_questRegistry = questRegistry;
_questFunctions = questFunctions;
_questTooltipComponent = questTooltipComponent;
_uiUtils = uiUtils;
_clientState = clientState;
_questController = questController;
_questSelector.SuggestionPredicate = (Quest quest) => configuration.Stop.QuestsToStopAfter.All((ElementId x) => x != quest.Id);
_questSelector.DefaultPredicate = (Quest quest) => quest.Info.IsMainScenarioQuest && questFunctions.IsQuestAccepted(quest.Id);
_questSelector.QuestSelected = delegate(Quest quest)
@ -94,7 +100,37 @@ internal sealed class StopConditionComponent : ConfigComponent
}
}
ImGui.Separator();
ImGui.Text("Stop when quest sequence reaches:");
bool v3 = base.Configuration.Stop.SequenceToStopAfter;
if (ImGui.Checkbox("Enable quest sequence stop condition", ref v3))
{
base.Configuration.Stop.SequenceToStopAfter = v3;
Save();
}
using (ImRaii.Disabled(!v3))
{
int data2 = base.Configuration.Stop.TargetSequence;
ImGui.SetNextItemWidth(100f);
if (ImGui.InputInt("Stop at sequence", ref data2, 1, 1))
{
base.Configuration.Stop.TargetSequence = Math.Max(0, Math.Min(255, data2));
Save();
}
QuestController.QuestProgress currentQuest = _questController.CurrentQuest;
if (currentQuest != null)
{
int sequence = currentQuest.Sequence;
ImGui.SameLine();
ImU8String text = new ImU8String(11, 1);
text.AppendLiteral("(Current: ");
text.AppendFormatted(sequence);
text.AppendLiteral(")");
ImGui.TextDisabled(text);
}
}
ImGui.Separator();
ImGui.Text("Stop when completing any of the quests selected below:");
DrawCurrentlyAcceptedQuests();
_questSelector.DrawSelection();
List<ElementId> questsToStopAfter = base.Configuration.Stop.QuestsToStopAfter;
if (questsToStopAfter.Count > 0)
@ -159,4 +195,88 @@ internal sealed class StopConditionComponent : ConfigComponent
}
}
}
private void DrawCurrentlyAcceptedQuests()
{
List<Quest> currentlyAcceptedQuests = GetCurrentlyAcceptedQuests();
ImGui.Text("Currently Accepted Quests:");
using (ImRaii.IEndObject endObject = ImRaii.Child("AcceptedQuestsList", new Vector2(-1f, 120f), border: true))
{
if (endObject)
{
if (currentlyAcceptedQuests.Count > 0)
{
foreach (Quest item in currentlyAcceptedQuests)
{
ImU8String id = new ImU8String(13, 1);
id.AppendLiteral("AcceptedQuest");
id.AppendFormatted(item.Id);
using (ImRaii.PushId(id))
{
(Vector4, FontAwesomeIcon, string) questStyle = _uiUtils.GetQuestStyle(item.Id);
bool flag = false;
bool flag2 = base.Configuration.Stop.QuestsToStopAfter.Contains(item.Id);
using (_pluginInterface.UiBuilder.IconFontFixedWidthHandle.Push())
{
ImGui.AlignTextToFramePadding();
ImGui.TextColored(flag2 ? new Vector4(0.5f, 0.5f, 0.5f, 1f) : questStyle.Item1, questStyle.Item2.ToIconString());
flag = ImGui.IsItemHovered();
}
ImGui.SameLine();
ImGui.AlignTextToFramePadding();
ImGui.TextColored(flag2 ? new Vector4(0.7f, 0.7f, 0.7f, 1f) : new Vector4(1f, 1f, 1f, 1f), item.Info.Name);
if (flag | ImGui.IsItemHovered())
{
_questTooltipComponent.Draw(item.Info);
}
using (ImRaii.PushFont(UiBuilder.IconFont))
{
ImGui.SameLine(ImGui.GetContentRegionAvail().X + ImGui.GetStyle().WindowPadding.X - ImGui.CalcTextSize(FontAwesomeIcon.Plus.ToIconString()).X - ImGui.GetStyle().FramePadding.X * 2f);
}
using (ImRaii.Disabled(flag2))
{
if (ImGuiComponents.IconButton($"##Add{item.Id}", FontAwesomeIcon.Plus))
{
base.Configuration.Stop.QuestsToStopAfter.Add(item.Id);
Save();
}
}
if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled))
{
ImGui.SetTooltip(flag2 ? "Quest already added to stop conditions" : "Add this quest to stop conditions");
}
}
}
}
else
{
ImGui.PushStyleColor(ImGuiCol.Text, new Vector4(0.7f, 0.7f, 0.7f, 1f));
ImGui.TextWrapped("No quests currently accepted");
ImGui.PopStyleColor();
}
}
}
ImGui.Spacing();
}
private List<Quest> GetCurrentlyAcceptedQuests()
{
List<Quest> list = new List<Quest>();
try
{
foreach (Quest allQuest in _questRegistry.AllQuests)
{
if (_questFunctions.IsQuestAccepted(allQuest.Id))
{
list.Add(allQuest);
}
}
list.Sort((Quest a, Quest b) => string.Compare(a.Info.Name, b.Info.Name, StringComparison.OrdinalIgnoreCase));
}
catch (Exception)
{
list.Clear();
}
return list;
}
}