diff --git a/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs b/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs index 5f3a5c2..7828b87 100644 --- a/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs +++ b/QuestPaths/Questionable.QuestPaths/AssemblyQuestLoader.cs @@ -463217,8 +463217,7 @@ public static class AssemblyQuestLoader ref QuestStep reference221 = ref span3[num2]; QuestStep obj199 = new QuestStep(EInteractionType.Interact, 1054640u, new Vector3(496.11658f, 142.24991f, 801.6022f), 1187) { - TargetTerritoryId = (ushort)1297, - Fly = true + TargetTerritoryId = (ushort)1297 }; SkipConditions skipConditions21 = new SkipConditions(); SkipStepConditions skipStepConditions20 = new SkipStepConditions(); diff --git a/Questionable/Questionable.Controller/QuestController.cs b/Questionable/Questionable.Controller/QuestController.cs index c8b8b96..18dc6cd 100644 --- a/Questionable/Questionable.Controller/QuestController.cs +++ b/Questionable/Questionable.Controller/QuestController.cs @@ -1131,47 +1131,8 @@ internal sealed class QuestController : MiniTaskController if (_questRegistry.TryGetQuest(elementId, out Quest quest) && !ManualPriorityQuests.Contains(quest)) { ManualPriorityQuests.Add(quest); - return true; } - return false; - } - - public int AddAllAvailableQuests() - { - List list = (from q in _questRegistry.AllQuests.Where(delegate(Quest quest) - { - if (quest.Root.Disabled || _questFunctions.IsQuestRemoved(quest.Id) || _questFunctions.IsQuestComplete(quest.Id) || _questFunctions.IsQuestAccepted(quest.Id) || quest.Info.IsRepeatable) - { - return false; - } - if (quest.Info.AlliedSociety != EAlliedSociety.None) - { - _logger.LogDebug("Excluding allied society quest {QuestId} from bulk add", quest.Id); - return false; - } - if (quest.Info is QuestInfo { MoogleDeliveryLevel: >0 }) - { - _logger.LogDebug("Excluding moogle delivery quest {QuestId} from bulk add", quest.Id); - return false; - } - if (!_questFunctions.IsReadyToAcceptQuest(quest.Id)) - { - _logger.LogTrace("Quest {QuestId} not ready to accept", quest.Id); - return false; - } - return true; - }) - select q.Id).ToList(); - _logger.LogInformation("Adding {Count} available quests to priority queue", list.Count); - int num = 0; - foreach (ElementId item in list) - { - if (AddQuestPriority(item)) - { - num++; - } - } - return num; + return true; } public bool InsertQuestPriority(int index, ElementId elementId) diff --git a/Questionable/Questionable.Windows.JournalComponents/QuestJournalComponent.cs b/Questionable/Questionable.Windows.JournalComponents/QuestJournalComponent.cs index 132fd5d..1598155 100644 --- a/Questionable/Questionable.Windows.JournalComponents/QuestJournalComponent.cs +++ b/Questionable/Questionable.Windows.JournalComponents/QuestJournalComponent.cs @@ -145,8 +145,6 @@ internal sealed class QuestJournalComponent } QuestJournalUtils.ShowFilterContextMenu(this); ImGui.SameLine(); - _questJournalUtils.AddAllAvailableQuests(); - ImGui.SameLine(); if (ImGuiComponents.IconButton(FontAwesomeIcon.GlobeEurope)) { Util.OpenLink("https://wigglymuffin.github.io/FFXIV-Tools/"); diff --git a/Questionable/Questionable.Windows.JournalComponents/QuestJournalUtils.cs b/Questionable/Questionable.Windows.JournalComponents/QuestJournalUtils.cs index 9a82b87..a142e22 100644 --- a/Questionable/Questionable.Windows.JournalComponents/QuestJournalUtils.cs +++ b/Questionable/Questionable.Windows.JournalComponents/QuestJournalUtils.cs @@ -234,71 +234,14 @@ internal sealed class QuestJournalUtils internal static void ShowFilterContextMenu(QuestJournalComponent journalUi) { - if (ImGuiComponents.IconButton(FontAwesomeIcon.Filter)) + if (ImGuiComponents.IconButtonWithText(FontAwesomeIcon.Filter, "Filter")) { - ImGui.OpenPopup("QuestFilters"); + ImGui.OpenPopup("##QuestFilters"); } - if (ImGui.IsItemHovered()) - { - ImGui.SetTooltip("Filter Options"); - } - using ImRaii.IEndObject endObject = ImRaii.Popup("QuestFilters"); - if (!ImRaii.IEndObject.op_True(endObject)) - { - return; - } - if ((0u | (ImGui.Checkbox("Available Only", ref journalUi.Filter.AvailableOnly) ? 1u : 0u) | (ImGui.Checkbox("Hide Without Quest Paths", ref journalUi.Filter.HideNoPaths) ? 1u : 0u) | (ImGui.Checkbox("Hide Unobtainable", ref journalUi.Filter.HideUnobtainable) ? 1u : 0u)) != 0) + using ImRaii.IEndObject endObject = ImRaii.Popup("##QuestFilters"); + if (!(!endObject) && (ImGui.Checkbox("Show only Available Quests", ref journalUi.Filter.AvailableOnly) || ImGui.Checkbox("Hide Quests Without Path", ref journalUi.Filter.HideNoPaths) || ImGui.Checkbox("Hide Unobtainable Quests", ref journalUi.Filter.HideUnobtainable))) { journalUi.UpdateFilter(); } - if (journalUi.Filter.AdvancedFiltersActive) - { - ImGui.Separator(); - if (ImGui.Button("Clear Filters")) - { - journalUi.Filter.AvailableOnly = false; - journalUi.Filter.HideNoPaths = false; - journalUi.Filter.HideUnobtainable = false; - journalUi.UpdateFilter(); - } - } - } - - public void AddAllAvailableQuests() - { - int num = _questRegistry.AllQuests.Count((Quest quest) => !quest.Root.Disabled && !_questFunctions.IsQuestRemoved(quest.Id) && _questFunctions.IsReadyToAcceptQuest(quest.Id) && !_questFunctions.IsQuestComplete(quest.Id) && !_questFunctions.IsQuestAccepted(quest.Id) && !quest.Info.IsRepeatable && quest.Info.AlliedSociety == EAlliedSociety.None && !(quest.Info is QuestInfo { MoogleDeliveryLevel: >0 }) && !_questController.ManualPriorityQuests.Any((Quest q) => q.Id.Equals(quest.Id))); - using (ImRaii.Disabled(num == 0)) - { - if (ImGuiComponents.IconButton(FontAwesomeIcon.ListOl)) - { - int num2 = _questController.AddAllAvailableQuests(); - string value = ((num2 == 1) ? "quest" : "quests"); - _chatGui.Print($"Added {num2} {value} to priority queue.", "Questionable", 576); - } - } - if (ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled)) - { - object obj; - switch (num) - { - case 0: - ImGui.SetTooltip("No available quests to add"); - return; - default: - obj = "quests"; - break; - case 1: - obj = "quest"; - break; - } - string value2 = (string)obj; - ImU8String tooltip = new ImU8String(27, 2); - tooltip.AppendLiteral("Add "); - tooltip.AppendFormatted(num); - tooltip.AppendLiteral(" available "); - tooltip.AppendFormatted(value2); - tooltip.AppendLiteral(" to priority"); - ImGui.SetTooltip(tooltip); - } } }