From 6ce091607f9cf40452bc49c1480eca7fedb204ec Mon Sep 17 00:00:00 2001 From: MarcelineVQ Date: Sun, 8 Mar 2026 11:30:04 -0700 Subject: [PATCH] Rename embedded addons to WeirdUtils_ namespace Prefix all addon folder names with WeirdUtils_ to avoid collisions with real addons. Rename SavedVariables global from UI_MinimapIcons to WeirdUtils_MinimapIconsSettings. --- src/interact/addon/Interact.toc | 2 +- src/logsessions/addon/LogSessions.toc | 2 +- src/main.zig | 12 ++++++------ src/markers/addon/WorldMarkers.toc | 2 +- src/minimapicons/RESEARCH.md | 2 +- src/minimapicons/addon/MinimapIcons.lua | 12 ++++++------ src/minimapicons/addon/MinimapIcons.toc | 4 ++-- src/outline/addon/Outline.toc | 2 +- src/screenshot/addon/Screenshot.toc | 2 +- 9 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/interact/addon/Interact.toc b/src/interact/addon/Interact.toc index 003f536..425297b 100644 --- a/src/interact/addon/Interact.toc +++ b/src/interact/addon/Interact.toc @@ -1,5 +1,5 @@ ## Interface: 11200 -## Title: Interact +## Title: WeirdUtils_Interact ## Notes: Nearest NPC/object interaction and bulk looting ## Version: 1.0 diff --git a/src/logsessions/addon/LogSessions.toc b/src/logsessions/addon/LogSessions.toc index 66de3ff..8cfc953 100644 --- a/src/logsessions/addon/LogSessions.toc +++ b/src/logsessions/addon/LogSessions.toc @@ -1,5 +1,5 @@ ## Interface: 11200 -## Title: LogSessions +## Title: WeirdUtils_LogSessions ## Notes: Session-based combat and chat log management ## Version: 1.0 diff --git a/src/main.zig b/src/main.zig index 4f6b4c8..6dce5df 100644 --- a/src/main.zig +++ b/src/main.zig @@ -144,12 +144,12 @@ const EmbedModule = struct { }; const embed_modules = [_]EmbedModule{ - .{ .option = "screenshot", .addon_name = "Screenshot", .addon_files_opt = "screenshot_addon_files" }, - .{ .option = "interact", .addon_name = "Interact", .addon_files_opt = "interact_addon_files" }, - .{ .option = "outline", .addon_name = "Outline", .addon_files_opt = "outline_addon_files" }, - .{ .option = "worldmarkers", .addon_name = "WorldMarkers", .addon_files_opt = "worldmarkers_addon_files", .asset_files_opt = "worldmarkers_asset_files" }, - .{ .option = "logsessions", .addon_name = "LogSessions", .addon_files_opt = "logsessions_addon_files" }, - .{ .option = "minimapicons", .addon_name = "MinimapIcons", .addon_files_opt = "minimapicons_addon_files", .asset_files_opt = "minimapicons_asset_files" }, + .{ .option = "screenshot", .addon_name = "WeirdUtils_Screenshot", .addon_files_opt = "screenshot_addon_files" }, + .{ .option = "interact", .addon_name = "WeirdUtils_Interact", .addon_files_opt = "interact_addon_files" }, + .{ .option = "outline", .addon_name = "WeirdUtils_Outline", .addon_files_opt = "outline_addon_files" }, + .{ .option = "worldmarkers", .addon_name = "WeirdUtils_WorldMarkers", .addon_files_opt = "worldmarkers_addon_files", .asset_files_opt = "worldmarkers_asset_files" }, + .{ .option = "logsessions", .addon_name = "WeirdUtils_LogSessions", .addon_files_opt = "logsessions_addon_files" }, + .{ .option = "minimapicons", .addon_name = "WeirdUtils_MinimapIcons", .addon_files_opt = "minimapicons_addon_files", .asset_files_opt = "minimapicons_asset_files" }, }; /// Extract filename from a path like "markers/addon/Foo.lua" → "Foo.lua" diff --git a/src/markers/addon/WorldMarkers.toc b/src/markers/addon/WorldMarkers.toc index 87fc0e3..ed2a281 100644 --- a/src/markers/addon/WorldMarkers.toc +++ b/src/markers/addon/WorldMarkers.toc @@ -1,5 +1,5 @@ ## Interface: 11200 -## Title: WorldMarkers +## Title: WeirdUtils_WorldMarkers ## Notes: Client-side world markers ## Version: 1.0 diff --git a/src/minimapicons/RESEARCH.md b/src/minimapicons/RESEARCH.md index c37de17..62c6798 100644 --- a/src/minimapicons/RESEARCH.md +++ b/src/minimapicons/RESEARCH.md @@ -87,7 +87,7 @@ Dynamic arrays (each: capacity/count/data_ptr/growth at 3 dword intervals): `LoadAddonTOC` reads the TOC file via `LoadFileWithTextureResourceFallback`, which our `loadFileDetour` already intercepts. So calling `LoadAddonTOC("MinimapIcons")` will: 1. Hit our file hook, serve the embedded TOC content -2. Parse `## SavedVariablesPerCharacter: UI_MinimapIcons` +2. Parse `## SavedVariablesPerCharacter: WeirdUtils_MinimapIconsSettings` 3. Register the addon in the hash table with the variable name at +0x78/7c/80 Hook `SetupAddonProcessing` (0x0051c740). After calling the original (which runs `ProcessAddonDirectory` and initializes the addon system), call `LoadAddonTOC` for each DLL-embedded addon. This ensures: diff --git a/src/minimapicons/addon/MinimapIcons.lua b/src/minimapicons/addon/MinimapIcons.lua index 30cefd0..e1677a7 100644 --- a/src/minimapicons/addon/MinimapIcons.lua +++ b/src/minimapicons/addon/MinimapIcons.lua @@ -112,7 +112,7 @@ local NPC_CATEGORIES = { -- NPC tracking state (persisted per-character via SavedVariablesPerCharacter) -- ============================================================================= -local activeNpcCategories = {} -- name -> 1/nil, loaded from UI_MinimapIcons +local activeNpcCategories = {} -- name -> 1/nil, loaded from WeirdUtils_MinimapIconsSettings -- Sync DLL tracking state with addon toggle state. -- Each category gets its own DLL call. Categories with a subnameFilter @@ -172,7 +172,7 @@ end -- Dropdown menu -- ============================================================================= -local dropdown = CreateFrame("Frame", "MinimapIconsDropDown", UIParent, "UIDropDownMenuTemplate") +local dropdown = CreateFrame("Frame", "WeirdUtils_MinimapIconsDropDown", UIParent, "UIDropDownMenuTemplate") UIDropDownMenu_Initialize(dropdown, function() -- Spell tracking section @@ -232,7 +232,7 @@ UIDropDownMenu_Initialize(dropdown, function() else activeNpcCategories[catName] = 1 end - UI_MinimapIcons = activeNpcCategories + WeirdUtils_MinimapIconsSettings = activeNpcCategories updateDllTracking() end UIDropDownMenu_AddButton(info) @@ -317,15 +317,15 @@ events:RegisterEvent("PLAYER_AURAS_CHANGED") events:SetScript("OnEvent", function() if event == "VARIABLES_LOADED" then - if UI_MinimapIcons then - activeNpcCategories = UI_MinimapIcons + if WeirdUtils_MinimapIconsSettings then + activeNpcCategories = WeirdUtils_MinimapIconsSettings else for _, cat in ipairs(NPC_CATEGORIES) do if cat.default then activeNpcCategories[cat.name] = 1 end end - UI_MinimapIcons = activeNpcCategories + WeirdUtils_MinimapIconsSettings = activeNpcCategories end updateDllTracking() elseif event == "PLAYER_LOGIN" or event == "SPELLS_CHANGED" then diff --git a/src/minimapicons/addon/MinimapIcons.toc b/src/minimapicons/addon/MinimapIcons.toc index 7274d89..2575448 100644 --- a/src/minimapicons/addon/MinimapIcons.toc +++ b/src/minimapicons/addon/MinimapIcons.toc @@ -1,7 +1,7 @@ ## Interface: 11200 -## Title: MinimapIcons +## Title: WeirdUtils_MinimapIcons ## Notes: Minimap tracking spell dropdown ## Version: 1.0 -## SavedVariablesPerCharacter: UI_MinimapIcons +## SavedVariablesPerCharacter: WeirdUtils_MinimapIconsSettings MinimapIcons.lua \ No newline at end of file diff --git a/src/outline/addon/Outline.toc b/src/outline/addon/Outline.toc index 7e8728c..9c04e87 100644 --- a/src/outline/addon/Outline.toc +++ b/src/outline/addon/Outline.toc @@ -1,5 +1,5 @@ ## Interface: 11200 -## Title: Outline +## Title: WeirdUtils_Outline ## Notes: Screen-space outline rendering for targets, raid marks, and corpses ## Version: 1.0 diff --git a/src/screenshot/addon/Screenshot.toc b/src/screenshot/addon/Screenshot.toc index 594db4b..3210498 100644 --- a/src/screenshot/addon/Screenshot.toc +++ b/src/screenshot/addon/Screenshot.toc @@ -1,5 +1,5 @@ ## Interface: 11200 -## Title: Screenshot +## Title: WeirdUtils_Screenshot ## Notes: PNG screenshot capture with configurable compression ## Version: 1.0