fix(tooltip): make Ascension quest-line stripping opt-in (#16)

HideAscensionQuestLines ran on every tooltip and removed any line
matching a quest-objective pattern (N/M, [N] ...), clobbering other
tooltip addons' lines (durability, stack counts, etc.). Gate it behind a
new General-tab option 'Hide Ascension quest progress lines' (default
off) so Questie no longer modifies tooltip lines it does not own by
default. Existing installs read the unset option as off automatically.
This commit is contained in:
Xurkon
2026-06-10 20:39:21 -05:00
parent cee005fc63
commit 49bc586c15
4 changed files with 18 additions and 0 deletions
@@ -436,6 +436,16 @@ function QuestieOptions.tabs.general:Initialize()
get = function () return Questie.db.profile.enableTooltips; end,
set = function (_, value) Questie.db.profile.enableTooltips = value end
},
hideAscensionTooltipQuestLines = {
type = "toggle",
order = 8.15,
name = function() return l10n('Hide Ascension quest progress lines'); end,
desc = function() return l10n('Removes the quest-objective progress lines that the Ascension server injects into tooltips (e.g. "0/8 ..."). Off by default so Questie does not modify lines added by other tooltip addons.'); end,
width = 1.5,
disabled = function() return not Questie.db.profile.enableTooltips; end,
get = function() return Questie.db.profile.hideAscensionTooltipQuestLines; end,
set = function (_, value) Questie.db.profile.hideAscensionTooltipQuestLines = value end
},
questsInNpcTooltip = {
type = "toggle",
order = 8.2,
@@ -89,6 +89,7 @@ function QuestieOptionsDefaults:Load()
enableTooltipsQuestLevel = true,
enableTooltipsSource = false,
elvuiStyleTooltips = false,
hideAscensionTooltipQuestLines = false,
showQuestXpAtMaxLevel = true,
enableTooltipsNextInChain = true,
learnerTooltips = true,
+6
View File
@@ -254,6 +254,12 @@ end
function _QuestieTooltips:HideAscensionQuestLines(tooltip)
if not Questie.db.profile.enableTooltips then return end
-- Opt-in only. This strips lines matching quest-objective patterns ("N/M", "[N] ...")
-- from tooltips to hide Ascension's server-injected quest progress. It runs on every
-- tooltip, so by default it must NOT touch them — otherwise it clobbers other tooltip
-- addons' lines that happen to look like "N/M" (durability, stack counts, etc.). Users
-- who want the Ascension quest-spam hidden can enable it explicitly. (#16)
if not Questie.db.profile.hideAscensionTooltipQuestLines then return end
local numLines = tooltip:NumLines()
if not numLines or numLines < 1 then return end