feat(tooltip): accurate per-pin data source attribution
Re-adds the 'Show data source' tooltip option (General tab, default off), but accurate this time. The previous version was removed because it guessed the source from the global data-source mode (showing Learner when data was AscensionDB, etc.). This tags each pin with its real provenance at creation and reads that tag. - QuestieDB.GetPinDataSource(entityType, id, spawnData): resolves Learner (per-spawn isLearned or learner record), AscensionDB (curated ascensionOverrideKeys override), or base Questie DB. Never guesses. - Objective pins tagged per-spawn in _DetermineIconsToDraw; available/ finisher pins defaulted by quest in DrawWorldIcon; manual notes tagged Townsfolk in DrawManualIcon. - World-map pins read the per-pin tag (MapIconTooltip); unit/object/item hovers derive per-id at the render layer (TooltipHandler via QuestieTooltips:GetDataSourceLine). Comms appended via KeyExists. - No line shown when source is genuinely unknown (never misleading).
This commit is contained in:
@@ -558,6 +558,18 @@ function QuestieOptions.tabs.general:Initialize()
|
||||
Questie.db.profile.learnerTooltipUseSecondary = value
|
||||
end
|
||||
},
|
||||
showDataSource = {
|
||||
type = "toggle",
|
||||
order = 8.605,
|
||||
name = function() return l10n('Show data source'); end,
|
||||
desc = function() return l10n('Adds a "Source:" line to NPC, object and map-pin tooltips showing where the data came from (Questie DB, AscensionDB, Learner, Townsfolk, Comms). Only shown when the source is actually known.'); end,
|
||||
width = 1.5,
|
||||
disabled = function() return not Questie.db.profile.enableTooltips; end,
|
||||
get = function() return Questie.db.profile.enableTooltipsSource == true end,
|
||||
set = function(_, value)
|
||||
Questie.db.profile.enableTooltipsSource = value
|
||||
end
|
||||
},
|
||||
partyOnlyToggle = {
|
||||
type = "toggle",
|
||||
order = 8.61,
|
||||
|
||||
@@ -87,6 +87,7 @@ function QuestieOptionsDefaults:Load()
|
||||
enableTooltipsObjectID = false,
|
||||
enableTooltipsQuestID = false,
|
||||
enableTooltipsQuestLevel = true,
|
||||
enableTooltipsSource = false,
|
||||
showQuestXpAtMaxLevel = true,
|
||||
enableTooltipsNextInChain = true,
|
||||
learnerTooltips = true,
|
||||
|
||||
Reference in New Issue
Block a user