From 2389beb056bac6cd484602bf598bbd99ebf3d6cd Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Thu, 19 Sep 2024 00:54:21 +0200 Subject: [PATCH] Handle certain interaction interruptions --- .../Ultima Thule/4354_Combat Evolved.json | 16 ++++++++++++++++ Questionable/Controller/QuestController.cs | 1 - .../Controller/Steps/Common/NextQuest.cs | 1 + .../Steps/Interactions/AetherCurrent.cs | 1 + .../Steps/Interactions/AethernetShard.cs | 1 + .../Controller/Steps/Interactions/Aetheryte.cs | 1 + .../Controller/Steps/Interactions/Interact.cs | 2 ++ .../Controller/Steps/Shared/WaitAtEnd.cs | 2 ++ 8 files changed, 24 insertions(+), 1 deletion(-) diff --git a/QuestPaths/6.x - Endwalker/Aether Currents/Ultima Thule/4354_Combat Evolved.json b/QuestPaths/6.x - Endwalker/Aether Currents/Ultima Thule/4354_Combat Evolved.json index 393eba29..752ec884 100644 --- a/QuestPaths/6.x - Endwalker/Aether Currents/Ultima Thule/4354_Combat Evolved.json +++ b/QuestPaths/6.x - Endwalker/Aether Currents/Ultima Thule/4354_Combat Evolved.json @@ -27,6 +27,22 @@ { "Sequence": 1, "Steps": [ + { + "Position": { + "X": 588.5607, + "Y": 437.99976, + "Z": 299.7425 + }, + "TerritoryId": 960, + "InteractionType": "Jump", + "JumpDestination": { + "Position": { + "X": 602.4677, + "Y": 438.6276, + "Z": 297.1612 + } + } + }, { "Position": { "X": 656.94653, diff --git a/Questionable/Controller/QuestController.cs b/Questionable/Controller/QuestController.cs index 8a1ed773..b736de2e 100644 --- a/Questionable/Controller/QuestController.cs +++ b/Questionable/Controller/QuestController.cs @@ -811,7 +811,6 @@ internal sealed class QuestController : MiniTaskController, IDi private void OnErrorToast(ref SeString message, ref bool isHandled) { - _logger.LogWarning("XXX {A} → {B} XXX", _actionCanceledText, message.TextValue); if (_taskQueue.CurrentTaskExecutor is IToastAware toastAware) { if (toastAware.OnErrorToast(message)) diff --git a/Questionable/Controller/Steps/Common/NextQuest.cs b/Questionable/Controller/Steps/Common/NextQuest.cs index 2c889375..7f4b0261 100644 --- a/Questionable/Controller/Steps/Common/NextQuest.cs +++ b/Questionable/Controller/Steps/Common/NextQuest.cs @@ -30,6 +30,7 @@ internal static class NextQuest internal sealed record SetQuestTask(ElementId NextQuestId, ElementId CurrentQuestId) : ITask { + public bool ShouldRedoOnInterrupt() => true; public override string ToString() => $"SetNextQuest({NextQuestId})"; } diff --git a/Questionable/Controller/Steps/Interactions/AetherCurrent.cs b/Questionable/Controller/Steps/Interactions/AetherCurrent.cs index e0f65c1a..b244bbea 100644 --- a/Questionable/Controller/Steps/Interactions/AetherCurrent.cs +++ b/Questionable/Controller/Steps/Interactions/AetherCurrent.cs @@ -36,6 +36,7 @@ internal static class AetherCurrent internal sealed record Attune(uint DataId, uint AetherCurrentId) : ITask { + public bool ShouldRedoOnInterrupt() => true; public override string ToString() => $"AttuneAetherCurrent({AetherCurrentId})"; } diff --git a/Questionable/Controller/Steps/Interactions/AethernetShard.cs b/Questionable/Controller/Steps/Interactions/AethernetShard.cs index d7d09a0c..b1af7fe9 100644 --- a/Questionable/Controller/Steps/Interactions/AethernetShard.cs +++ b/Questionable/Controller/Steps/Interactions/AethernetShard.cs @@ -26,6 +26,7 @@ internal static class AethernetShard internal sealed record Attune(EAetheryteLocation AetheryteLocation) : ITask { + public bool ShouldRedoOnInterrupt() => true; public override string ToString() => $"AttuneAethernetShard({AetheryteLocation})"; } diff --git a/Questionable/Controller/Steps/Interactions/Aetheryte.cs b/Questionable/Controller/Steps/Interactions/Aetheryte.cs index 6d3cb54d..d9754776 100644 --- a/Questionable/Controller/Steps/Interactions/Aetheryte.cs +++ b/Questionable/Controller/Steps/Interactions/Aetheryte.cs @@ -24,6 +24,7 @@ internal static class Aetheryte internal sealed record Attune(EAetheryteLocation AetheryteLocation) : ITask { + public bool ShouldRedoOnInterrupt() => true; public override string ToString() => $"AttuneAetheryte({AetheryteLocation})"; } diff --git a/Questionable/Controller/Steps/Interactions/Interact.cs b/Questionable/Controller/Steps/Interactions/Interact.cs index 286cf828..5dd28d20 100644 --- a/Questionable/Controller/Steps/Interactions/Interact.cs +++ b/Questionable/Controller/Steps/Interactions/Interact.cs @@ -63,6 +63,8 @@ internal static class Interact uint? PickUpItemId = null, SkipStepConditions? SkipConditions = null) : ITask { + public bool ShouldRedoOnInterrupt() => true; + public override string ToString() => $"Interact({DataId})"; } diff --git a/Questionable/Controller/Steps/Shared/WaitAtEnd.cs b/Questionable/Controller/Steps/Shared/WaitAtEnd.cs index 083fff42..d64c009b 100644 --- a/Questionable/Controller/Steps/Shared/WaitAtEnd.cs +++ b/Questionable/Controller/Steps/Shared/WaitAtEnd.cs @@ -143,6 +143,8 @@ internal static class WaitAtEnd { } + public bool ShouldRedoOnInterrupt() => true; + public override string ToString() => $"Wait(seconds: {Delay.TotalSeconds})"; }