From: Liza Carvelli Date: Mon, 18 Aug 2025 21:47:31 +0000 (+0200) Subject: Automatically select 'Mouse/Keyboard' for new characters X-Git-Tag: v6.3~12 X-Git-Url: https://git.jacobcasper.com/?a=commitdiff_plain;h=94e6e745057545cfb98ef4f3e3eea8e2f83d1a65;p=Questionable.git Automatically select 'Mouse/Keyboard' for new characters --- diff --git a/QuestPaths/2.x - A Realm Reborn/MSQ-1/Gridania/39_Coming to Gridania.json b/QuestPaths/2.x - A Realm Reborn/MSQ-1/Gridania/39_Coming to Gridania.json index 1db1d6e1..9026dd6e 100644 --- a/QuestPaths/2.x - A Realm Reborn/MSQ-1/Gridania/39_Coming to Gridania.json +++ b/QuestPaths/2.x - A Realm Reborn/MSQ-1/Gridania/39_Coming to Gridania.json @@ -13,7 +13,15 @@ "Z": 143.63306 }, "TerritoryId": 183, - "InteractionType": "AcceptQuest" + "InteractionType": "AcceptQuest", + "DialogueChoices": [ + { + "Type": "List", + "ExcelSheet": "opening/OpeningGridania", + "Prompt": "TEXT_OPENINGGRIDANIA_FST_SYSTEM_Q_01", + "Answer": "TEXT_OPENINGGRIDANIA_FST_SYSTEM_A_01" + } + ] } ] }, diff --git a/QuestPaths/2.x - A Realm Reborn/MSQ-1/Limsa/107_Coming to Limsa Lominsa.json b/QuestPaths/2.x - A Realm Reborn/MSQ-1/Limsa/107_Coming to Limsa Lominsa.json index e6c6a168..98842cc8 100644 --- a/QuestPaths/2.x - A Realm Reborn/MSQ-1/Limsa/107_Coming to Limsa Lominsa.json +++ b/QuestPaths/2.x - A Realm Reborn/MSQ-1/Limsa/107_Coming to Limsa Lominsa.json @@ -13,7 +13,15 @@ "Z": -4.9592285 }, "TerritoryId": 181, - "InteractionType": "AcceptQuest" + "InteractionType": "AcceptQuest", + "DialogueChoices": [ + { + "Type": "List", + "ExcelSheet": "opening/OpeningLimsaLominsa", + "Prompt": "TEXT_OPENINGLIMSALOMINSA_FST_SYSTEM_Q_01", + "Answer": "TEXT_OPENINGLIMSALOMINSA_FST_SYSTEM_A_01" + } + ] } ] }, diff --git a/QuestPaths/2.x - A Realm Reborn/MSQ-1/Ul'dah/594_Coming to Ul'dah.json b/QuestPaths/2.x - A Realm Reborn/MSQ-1/Ul'dah/594_Coming to Ul'dah.json index 8a0fae6c..d77f339b 100644 --- a/QuestPaths/2.x - A Realm Reborn/MSQ-1/Ul'dah/594_Coming to Ul'dah.json +++ b/QuestPaths/2.x - A Realm Reborn/MSQ-1/Ul'dah/594_Coming to Ul'dah.json @@ -13,7 +13,15 @@ "Z": -151.99518 }, "TerritoryId": 182, - "InteractionType": "AcceptQuest" + "InteractionType": "AcceptQuest", + "DialogueChoices": [ + { + "Type": "List", + "ExcelSheet": "opening/OpeningUldah", + "Prompt": "TEXT_OPENINGULDAH_FST_SYSTEM_Q_01", + "Answer": "TEXT_OPENINGULDAH_FST_SYSTEM_A_01" + } + ] } ] }, diff --git a/Questionable/Controller/GameUi/InteractionUiController.cs b/Questionable/Controller/GameUi/InteractionUiController.cs index e5bb01fe..66de0e17 100644 --- a/Questionable/Controller/GameUi/InteractionUiController.cs +++ b/Questionable/Controller/GameUi/InteractionUiController.cs @@ -93,6 +93,7 @@ internal sealed class InteractionUiController : IDisposable _returnRegex = _dataManager.GetExcelSheet().GetRow(196).GetRegex(addon => addon.Text, pluginLog)!; _purchaseItemRegex = _dataManager.GetRegex(3406, addon => addon.Text, pluginLog)!; + _questController.AutomationTypeChanged += HandleCurrentDialogueChoices; _addonLifecycle.RegisterListener(AddonEvent.PostSetup, "SelectString", SelectStringPostSetup); _addonLifecycle.RegisterListener(AddonEvent.PostSetup, "CutSceneSelectString", CutsceneSelectStringPostSetup); _addonLifecycle.RegisterListener(AddonEvent.PostSetup, "SelectIconString", SelectIconStringPostSetup); @@ -114,6 +115,12 @@ internal sealed class InteractionUiController : IDisposable _questController.IsRunning || _territoryData.IsQuestBattleInstance(_clientState.TerritoryType); + private void HandleCurrentDialogueChoices(object sender, QuestController.EAutomationType automationType) + { + if (automationType != QuestController.EAutomationType.Manual) + HandleCurrentDialogueChoices(); + } + internal unsafe void HandleCurrentDialogueChoices() { try @@ -970,6 +977,7 @@ internal sealed class InteractionUiController : IDisposable _addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "SelectIconString", SelectIconStringPostSetup); _addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "CutSceneSelectString", CutsceneSelectStringPostSetup); _addonLifecycle.UnregisterListener(AddonEvent.PostSetup, "SelectString", SelectStringPostSetup); + _questController.AutomationTypeChanged -= HandleCurrentDialogueChoices; } private sealed record DialogueChoiceInfo(Quest? Quest, DialogueChoice DialogueChoice); diff --git a/Questionable/DalamudInitializer.cs b/Questionable/DalamudInitializer.cs index a975b817..7550a8d8 100644 --- a/Questionable/DalamudInitializer.cs +++ b/Questionable/DalamudInitializer.cs @@ -73,7 +73,6 @@ internal sealed class DalamudInitializer : IDisposable _pluginInterface.UiBuilder.OpenMainUi += ToggleQuestWindow; _pluginInterface.UiBuilder.OpenConfigUi += _configWindow.Toggle; _framework.Update += FrameworkUpdate; - _framework.RunOnTick(interactionUiController.HandleCurrentDialogueChoices, TimeSpan.FromMilliseconds(200)); _toastGui.Toast += OnToast; _toastGui.ErrorToast += OnErrorToast; _toastGui.QuestToast += OnQuestToast;