From 66a61ae27f0501b36eb2465243a4bbfa0f5eac92 Mon Sep 17 00:00:00 2001 From: Liza Carvelli Date: Mon, 10 Mar 2025 17:07:00 +0100 Subject: [PATCH] Add experimental option to disable AutoDuty bare mode --- Questionable/Configuration.cs | 1 + Questionable/External/AutoDutyIpc.cs | 2 +- .../ConfigComponents/DebugConfigComponent.cs | 20 +++++++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/Questionable/Configuration.cs b/Questionable/Configuration.cs index 3ee57379..2979cdb1 100644 --- a/Questionable/Configuration.cs +++ b/Questionable/Configuration.cs @@ -70,6 +70,7 @@ internal sealed class Configuration : IPluginConfiguration public bool DebugOverlay { get; set; } public bool NeverFly { get; set; } public bool AdditionalStatusInformation { get; set; } + public bool DisableAutoDutyBareMode { get; set; } } internal enum ECombatModule diff --git a/Questionable/External/AutoDutyIpc.cs b/Questionable/External/AutoDutyIpc.cs index 29675cd1..f1d77558 100644 --- a/Questionable/External/AutoDutyIpc.cs +++ b/Questionable/External/AutoDutyIpc.cs @@ -75,7 +75,7 @@ internal sealed class AutoDutyIpc try { _setConfig.InvokeAction("dutyModeEnum", "Support"); - _run.InvokeAction(cfcData.TerritoryId, 1, true); + _run.InvokeAction(cfcData.TerritoryId, 1, !_configuration.Advanced.DisableAutoDutyBareMode); } catch (IpcError e) { diff --git a/Questionable/Windows/ConfigComponents/DebugConfigComponent.cs b/Questionable/Windows/ConfigComponents/DebugConfigComponent.cs index c410f3fb..cc9fe35a 100644 --- a/Questionable/Windows/ConfigComponents/DebugConfigComponent.cs +++ b/Questionable/Windows/ConfigComponents/DebugConfigComponent.cs @@ -1,4 +1,6 @@ using Dalamud.Interface.Colors; +using Dalamud.Interface.Components; +using Dalamud.Interface.Utility; using Dalamud.Interface.Utility.Raii; using Dalamud.Plugin; using ImGuiNET; @@ -44,6 +46,24 @@ internal sealed class DebugConfigComponent : ConfigComponent Save(); } + ImGui.Separator(); + + ImGui.Text("AutoDuty options"); + using (var _ = ImRaii.PushIndent()) + { + ImGui.AlignTextToFramePadding(); + bool disableAutoDutyBareMode = Configuration.Advanced.DisableAutoDutyBareMode; + if (ImGui.Checkbox("Use Pre-Loop/Loop/Post-Loop settings", ref disableAutoDutyBareMode)) + { + Configuration.Advanced.DisableAutoDutyBareMode = disableAutoDutyBareMode; + Save(); + } + + ImGui.SameLine(); + ImGuiComponents.HelpMarker( + "Typically, the loop settings for AutoDuty are disabled when running dungeons with Questionable, since they can cause issues (or even shut down your PC)."); + } + ImGui.EndTabItem(); } } -- 2.30.2