fix: allow instant quest text toggle

This commit is contained in:
Xurkon
2026-06-12 23:23:00 -05:00
parent fb3c78351f
commit 3ebcedb362
3 changed files with 36 additions and 14 deletions
+1
View File
@@ -52,6 +52,7 @@
### Bug Fixes ### Bug Fixes
- **[Options - Instant Quest Text Toggle]** Fixed the General tab "Enable Instant Quest Text" checkbox so it can be toggled even when the client reports the backing `instantQuestText` CVar as unset before the first write.
- **[Learner - Secondary Tooltip Without Spawn Coordinates]** Unit-hover learner tooltips now still open the secondary learner tooltip when the learner has confidence data but no recorded spawn coordinates yet. The normal unit tooltip suppression path also suppresses the old inline learner confidence line, so secondary mode no longer leaks learner-only lines back into the main tooltip. - **[Learner - Secondary Tooltip Without Spawn Coordinates]** Unit-hover learner tooltips now still open the secondary learner tooltip when the learner has confidence data but no recorded spawn coordinates yet. The normal unit tooltip suppression path also suppresses the old inline learner confidence line, so secondary mode no longer leaks learner-only lines back into the main tooltip.
- **[Map - Suppress Duplicate Native Quest POIs]** Rather than globally disabling the server/Blizzard objective POIs, Questie now keeps them enabled and hides only the individual Blizzard POI buttons for quests that already have a visible Questie POI (per-quest duplicate-POI suppression in `QuestieCompat`, hooked at init). Blizzard POIs still appear for quests Questie does not cover, but no longer stack on top of Questie's own objective icons. - **[Map - Suppress Duplicate Native Quest POIs]** Rather than globally disabling the server/Blizzard objective POIs, Questie now keeps them enabled and hides only the individual Blizzard POI buttons for quests that already have a visible Questie POI (per-quest duplicate-POI suppression in `QuestieCompat`, hooked at init). Blizzard POIs still appear for quests Questie does not cover, but no longer stack on top of Questie's own objective icons.
- **[Learner - Tooltips In Auto Mode]** Learner spawn tooltips now appear in Auto data-source mode, not only in learner-only mode, so learned spawn/quest detail still surfaces on hover while Auto is selected. - **[Learner - Tooltips In Auto Mode]** Learner spawn tooltips now appear in Auto data-source mode, not only in learner-only mode, so learned spawn/quest detail still surfaces on hover while Auto is selected.
@@ -32,6 +32,16 @@ local AvailableQuests = QuestieLoader:ImportModule("AvailableQuests")
---@class QuestieMap ---@class QuestieMap
local QuestieMap = QuestieLoader:CreateModule("QuestieMap"); local QuestieMap = QuestieLoader:CreateModule("QuestieMap");
local function GetInstantQuestTextEnabled()
if not GetCVar then return false end
return tostring(GetCVar("instantQuestText")) == "1"
end
local function SetInstantQuestTextEnabled(value)
if not SetCVar then return end
SetCVar("instantQuestText", value and "1" or "0")
end
QuestieOptions.tabs.general = {} QuestieOptions.tabs.general = {}
local optionsDefaults = QuestieOptionsDefaults:Load() local optionsDefaults = QuestieOptionsDefaults:Load()
@@ -204,21 +214,10 @@ function QuestieOptions.tabs.general:Initialize()
desc = function() return l10n('Toggles the default Instant Quest Text option. This is just a shortcut for the WoW option in Interface.'); end, desc = function() return l10n('Toggles the default Instant Quest Text option. This is just a shortcut for the WoW option in Interface.'); end,
width = 1.55, width = 1.55,
get = function() get = function()
local val = GetCVar("instantQuestText") return GetInstantQuestTextEnabled()
if val == '1' then
return true;
else
return false;
end
end, end,
set = function(info, value) set = function(_, value)
if GetCVar("instantQuestText") ~= nil then SetInstantQuestTextEnabled(value)
if value then
SetCVar("instantQuestText", "1");
else
SetCVar("instantQuestText", "0");
end
end
end, end,
}, },
showCustomQuestFrameIcons = { showCustomQuestFrameIcons = {
+22
View File
@@ -0,0 +1,22 @@
local function read(path)
local f = assert(io.open(path, "r"), "cannot open " .. path)
local c = f:read("*a")
f:close()
return c
end
local function has(content, needle)
return string.find(content, needle, 1, true) ~= nil
end
describe("Questie general options", function()
it("allows Instant Quest Text to be toggled even when the CVar is unset", function()
local general = read("Modules/Options/GeneralTab/QuestieOptionsGeneral.lua")
assert.is_true(has(general, "local function GetInstantQuestTextEnabled()"))
assert.is_true(has(general, "local function SetInstantQuestTextEnabled(value)"))
assert.is_true(has(general, "if not SetCVar then return end"))
assert.is_true(has(general, "SetCVar(\"instantQuestText\", value and \"1\" or \"0\")"))
assert.is_false(has(general, "if GetCVar(\"instantQuestText\") ~= nil then"))
end)
end)