Move log path update from core addon to logsessions addon
The combat/chat log path global updates are logsessions-specific and don't belong in the core addon. Created a dedicated LogSessions addon with its own TOC, embedded file entries, and conditional loading.
This commit is contained in:
@@ -10,14 +10,6 @@ frame:RegisterEvent("PLAYER_LOGIN")
|
|||||||
frame:SetScript("OnEvent", function()
|
frame:SetScript("OnEvent", function()
|
||||||
if event == "PLAYER_LOGIN" then
|
if event == "PLAYER_LOGIN" then
|
||||||
DEFAULT_CHAT_FRAME:AddMessage("|cff00ff00WeirdUtils|r v" .. WEIRDUTILS_VERSION .. " core loaded")
|
DEFAULT_CHAT_FRAME:AddMessage("|cff00ff00WeirdUtils|r v" .. WEIRDUTILS_VERSION .. " core loaded")
|
||||||
|
|
||||||
-- Update log path globals to show actual redirected paths (English locale only)
|
|
||||||
if GetCombatLogPath and COMBATLOGENABLED == "Combat being logged to Logs\\WoWCombatLog.txt" then
|
|
||||||
COMBATLOGENABLED = "Combat being logged to " .. GetCombatLogPath()
|
|
||||||
end
|
|
||||||
if GetChatLogPath and CHATLOGENABLED == "Chat being logged to Logs\\WoWChatLog.txt" then
|
|
||||||
CHATLOGENABLED = "Chat being logged to " .. GetChatLogPath()
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
-- LogSessions addon: update log path globals to show actual redirected paths
|
||||||
|
|
||||||
|
local frame = CreateFrame("Frame")
|
||||||
|
frame:RegisterEvent("PLAYER_LOGIN")
|
||||||
|
|
||||||
|
frame:SetScript("OnEvent", function()
|
||||||
|
if GetCombatLogPath and COMBATLOGENABLED == "Combat being logged to Logs\\WoWCombatLog.txt" then
|
||||||
|
COMBATLOGENABLED = "Combat being logged to " .. GetCombatLogPath()
|
||||||
|
end
|
||||||
|
if GetChatLogPath and CHATLOGENABLED == "Chat being logged to Logs\\WoWChatLog.txt" then
|
||||||
|
CHATLOGENABLED = "Chat being logged to " .. GetChatLogPath()
|
||||||
|
end
|
||||||
|
end)
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
## Interface: 11200
|
||||||
|
## Title: LogSessions
|
||||||
|
## Notes: Session-based combat and chat log management
|
||||||
|
## Version: 1.0
|
||||||
|
## Dependencies: WeirdUtils
|
||||||
|
|
||||||
|
LogSessions.lua
|
||||||
@@ -175,6 +175,11 @@ const outline_files = if (build_opts.outline) [_]FileEntry{
|
|||||||
.{ .name = "Bindings.xml", .data = @embedFile("outline/addon/Bindings.xml") },
|
.{ .name = "Bindings.xml", .data = @embedFile("outline/addon/Bindings.xml") },
|
||||||
} else [_]FileEntry{};
|
} else [_]FileEntry{};
|
||||||
|
|
||||||
|
const logsessions_files = if (build_opts.logsessions) [_]FileEntry{
|
||||||
|
.{ .name = "LogSessions.toc", .data = @embedFile("logsessions/addon/LogSessions.toc") },
|
||||||
|
.{ .name = "LogSessions.lua", .data = @embedFile("logsessions/addon/LogSessions.lua") },
|
||||||
|
} else [_]FileEntry{};
|
||||||
|
|
||||||
const markers_files = if (build_opts.worldmarkers) [_]FileEntry{
|
const markers_files = if (build_opts.worldmarkers) [_]FileEntry{
|
||||||
.{ .name = "WorldMarkers.toc", .data = @embedFile("markers/addon/Markers.toc") },
|
.{ .name = "WorldMarkers.toc", .data = @embedFile("markers/addon/Markers.toc") },
|
||||||
.{ .name = "WorldMarkers.lua", .data = @embedFile("markers/addon/Markers.lua") },
|
.{ .name = "WorldMarkers.lua", .data = @embedFile("markers/addon/Markers.lua") },
|
||||||
@@ -224,6 +229,7 @@ const addon_prefixes = [_]AddonPrefix{
|
|||||||
.{ .prefix = "Interface\\AddOns\\Screenshot\\", .files = &screenshot_files },
|
.{ .prefix = "Interface\\AddOns\\Screenshot\\", .files = &screenshot_files },
|
||||||
.{ .prefix = "Interface\\AddOns\\Interact\\", .files = &interact_files },
|
.{ .prefix = "Interface\\AddOns\\Interact\\", .files = &interact_files },
|
||||||
.{ .prefix = "Interface\\AddOns\\Outline\\", .files = &outline_files },
|
.{ .prefix = "Interface\\AddOns\\Outline\\", .files = &outline_files },
|
||||||
|
.{ .prefix = "Interface\\AddOns\\LogSessions\\", .files = &logsessions_files },
|
||||||
.{ .prefix = "Interface\\AddOns\\WorldMarkers\\", .files = &markers_files },
|
.{ .prefix = "Interface\\AddOns\\WorldMarkers\\", .files = &markers_files },
|
||||||
.{ .prefix = "Spells\\", .files = &markers_spells_assets },
|
.{ .prefix = "Spells\\", .files = &markers_spells_assets },
|
||||||
.{ .prefix = "Spells\\", .files = &markers_xyz_model },
|
.{ .prefix = "Spells\\", .files = &markers_xyz_model },
|
||||||
@@ -721,6 +727,13 @@ fn loadAddonsDetour(error_handler: u32) callconv(fc) void {
|
|||||||
error_handler,
|
error_handler,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
if (build_opts.logsessions) {
|
||||||
|
callLoadFileListWithIncludes(
|
||||||
|
"Interface\\AddOns\\LogSessions\\LogSessions.toc",
|
||||||
|
&md5ctx,
|
||||||
|
error_handler,
|
||||||
|
);
|
||||||
|
}
|
||||||
if (build_opts.worldmarkers and markers.isActive()) {
|
if (build_opts.worldmarkers and markers.isActive()) {
|
||||||
callLoadFileListWithIncludes(
|
callLoadFileListWithIncludes(
|
||||||
"Interface\\AddOns\\WorldMarkers\\WorldMarkers.toc",
|
"Interface\\AddOns\\WorldMarkers\\WorldMarkers.toc",
|
||||||
|
|||||||
Reference in New Issue
Block a user