feat: Add Quest Route Optimization feature

This commit is contained in:
Xurkon
2026-03-19 21:30:05 -05:00
parent eba0d39ca6
commit 971d780a9b
10 changed files with 411 additions and 8 deletions
@@ -158,6 +158,9 @@ function QuestieOptionsDefaults:Load()
objectiveProgressSoundChoiceName = "ObjectiveProgress",
iconTheme = "questie",
routeMode = 1,
routeDrawInterval = 5,
minimap = {
hide = false
},
@@ -15,6 +15,8 @@ local TrackerLinePool = QuestieLoader:ImportModule("TrackerLinePool")
local TrackerQuestTimers = QuestieLoader:ImportModule("TrackerQuestTimers")
---@type QuestieArrow
local QuestieArrow = QuestieLoader:ImportModule("QuestieArrow")
---@type QuestieRouteOptimizer
local QuestieRouteOptimizer = QuestieLoader:ImportModule("QuestieRouteOptimizer")
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
@@ -946,6 +948,30 @@ function QuestieOptions.tabs.tracker:Initialize()
},
}
},
route_header = {
type = "header",
order = 50,
name = function() return l10n('Quest Route Optimization') end,
},
routeMode = {
type = "select",
order = 51,
width = 2,
name = function() return l10n('Route Mode') end,
desc = function() return l10n('Choose how quest routes are calculated and displayed.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.routeMode or 1 end,
set = function(_, value)
Questie.db.profile.routeMode = value
QuestieRouteOptimizer:Update()
end,
values = {
[1] = l10n('Off'),
[2] = l10n('Single Quest'),
[3] = l10n('All Tracked Quests'),
[4] = l10n('TSP Approximation'),
},
},
}
}