From b6ee34d338c9a7f3a28d8b15e2c915f38eba5322 Mon Sep 17 00:00:00 2001 From: Simon Latusek Date: Mon, 13 Jan 2025 10:27:56 +0100 Subject: [PATCH] Don't tp in same zone --- Questionable/Configuration.cs | 2 ++ Questionable/Controller/Steps/Shared/AetheryteShortcut.cs | 3 ++- Questionable/Windows/ConfigWindow.cs | 7 +++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Questionable/Configuration.cs b/Questionable/Configuration.cs index 90c42bb5..7032c875 100644 --- a/Questionable/Configuration.cs +++ b/Questionable/Configuration.cs @@ -53,6 +53,8 @@ internal sealed class Configuration : IPluginConfiguration { public bool DebugOverlay { get; set; } public bool NeverFly { get; set; } + + public bool NeverPortInSameZone { get; set; } public bool AdditionalStatusInformation { get; set; } } diff --git a/Questionable/Controller/Steps/Shared/AetheryteShortcut.cs b/Questionable/Controller/Steps/Shared/AetheryteShortcut.cs index af575333..f2c5a5cb 100644 --- a/Questionable/Controller/Steps/Shared/AetheryteShortcut.cs +++ b/Questionable/Controller/Steps/Shared/AetheryteShortcut.cs @@ -58,6 +58,7 @@ internal static class AetheryteShortcut IClientState clientState, IChatGui chatGui, ICondition condition, + Configuration configuration, AetheryteData aetheryteData) : TaskExecutor { private bool _teleported; @@ -154,7 +155,7 @@ internal static class AetheryteShortcut { if (!skipConditions.Never) { - if (skipConditions is { InSameTerritory: true }) + if (skipConditions is { InSameTerritory: true } || configuration.Advanced.NeverPortInSameZone) { logger.LogInformation("Skipping aetheryte teleport due to SkipCondition (InSameTerritory)"); return true; diff --git a/Questionable/Windows/ConfigWindow.cs b/Questionable/Windows/ConfigWindow.cs index 131f3726..8943ddc1 100644 --- a/Questionable/Windows/ConfigWindow.cs +++ b/Questionable/Windows/ConfigWindow.cs @@ -452,6 +452,13 @@ internal sealed class ConfigWindow : LWindow, IPersistableWindowConfig Save(); } + bool neverPortInSameZone = this._configuration.Advanced.NeverPortInSameZone; + if (ImGui.Checkbox("Disable Aetheryte teleport in same zone", ref neverPortInSameZone)) + { + _configuration.Advanced.NeverPortInSameZone = neverPortInSameZone; + Save(); + } + bool additionalStatusInformation = _configuration.Advanced.AdditionalStatusInformation; if (ImGui.Checkbox("Draw additional status information", ref additionalStatusInformation)) {