-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompatibility.lua
More file actions
50 lines (44 loc) · 1.6 KB
/
Copy pathCompatibility.lua
File metadata and controls
50 lines (44 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
local _, WE = ...
WE.COMPATIBILITY_ADDONS = {
{
folder = "WaypointUI",
label = "Waypoint UI",
warning = "Waypoint UI detected. Waypoint Enhancer may have limited effect because another addon may replace or restyle Blizzard's waypoint frame.",
},
{
folder = "TomTom",
label = "TomTom",
warning = "TomTom detected. Waypoint Enhancer only styles Blizzard's native SuperTrackedFrame.",
},
{ folder = "MapPinEnhanced", label = "Map Pin Enhanced" },
{ folder = "SimpleWaypoints", label = "Simple Waypoints" },
{ folder = "UnlimitedMapPinDistance", label = "Unlimited Map Pin Distance" },
}
WE.compatibilityState = {
detected = {},
warnings = {},
}
function WE.RefreshCompatibility()
local detected = {}
local warnings = {}
for _, addon in ipairs(WE.COMPATIBILITY_ADDONS) do
if C_AddOns.IsAddOnLoaded(addon.folder) then
detected[#detected + 1] = addon.label
if addon.warning then
warnings[#warnings + 1] = addon.warning
end
end
end
WE.compatibilityState.detected = detected
WE.compatibilityState.warnings = warnings
if WE.UpdateCompatibilityPanel then
WE.UpdateCompatibilityPanel()
end
end
function WE.GetCompatibilitySummary()
local state = WE.compatibilityState
local detected = #state.detected > 0 and table.concat(state.detected, ", ") or "None"
local warning = #state.warnings > 0 and table.concat(state.warnings, "\n\n")
or "No known waypoint styling conflicts are currently loaded."
return detected, warning
end