Fix up config to comply with meta
Update
This commit is contained in:
@@ -140,6 +140,7 @@ local function init()
|
|||||||
---@field kickOffline boolean
|
---@field kickOffline boolean
|
||||||
---@field cleanupInterval number
|
---@field cleanupInterval number
|
||||||
---@field afkThreshold number
|
---@field afkThreshold number
|
||||||
|
---@field listeningChannel table<string, boolean>
|
||||||
|
|
||||||
---@class HeimdallDuelerConfig
|
---@class HeimdallDuelerConfig
|
||||||
---@field enabled boolean
|
---@field enabled boolean
|
||||||
@@ -234,6 +235,7 @@ local function init()
|
|||||||
---@field enabled boolean
|
---@field enabled boolean
|
||||||
---@field debug boolean
|
---@field debug boolean
|
||||||
---@field channels string[]
|
---@field channels string[]
|
||||||
|
---@field lastNotes number
|
||||||
|
|
||||||
---@class HeimdallNetworkConfig
|
---@class HeimdallNetworkConfig
|
||||||
---@field enabled boolean
|
---@field enabled boolean
|
||||||
@@ -371,6 +373,7 @@ local function init()
|
|||||||
kickOffline = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "kickOffline" }, false),
|
kickOffline = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "kickOffline" }, false),
|
||||||
cleanupInterval = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "cleanupInterval" }, 10),
|
cleanupInterval = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "cleanupInterval" }, 10),
|
||||||
afkThreshold = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "afkThreshold" }, 300),
|
afkThreshold = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "afkThreshold" }, 300),
|
||||||
|
listeningChannel = shared.GetOrDefault(Heimdall_Data, { "config", "inviter", "listeningChannel" }, {}),
|
||||||
},
|
},
|
||||||
dueler = {
|
dueler = {
|
||||||
enabled = shared.GetOrDefault(Heimdall_Data, { "config", "dueler", "enabled" }, false),
|
enabled = shared.GetOrDefault(Heimdall_Data, { "config", "dueler", "enabled" }, false),
|
||||||
|
|||||||
2
Meta
2
Meta
Submodule Meta updated: ba1f7e14bf...3f65afd97a
@@ -1,6 +1,5 @@
|
|||||||
local addonname, shared = ...
|
local _, shared = ...
|
||||||
---@cast shared HeimdallShared
|
---@cast shared HeimdallShared
|
||||||
---@cast addonname string
|
|
||||||
|
|
||||||
---@param str string
|
---@param str string
|
||||||
---@return table<string, boolean>
|
---@return table<string, boolean>
|
||||||
@@ -149,15 +148,15 @@ GridFrame = {
|
|||||||
rowspan = rowspan,
|
rowspan = rowspan,
|
||||||
parent = self,
|
parent = self,
|
||||||
}
|
}
|
||||||
---@diagnostic disable-next-line: inject-field, redefined-local
|
---@diagnostic disable-next-line: inject-field
|
||||||
frame.SetPos = function(self)
|
frame.SetPos = function(selff)
|
||||||
if not self.gridData then return end
|
if not selff.gridData then return end
|
||||||
local parent = self.gridData.parent
|
local parent = selff.gridData.parent
|
||||||
local x = (self.gridData.column - 1) * parent.cellWidth
|
local x = (selff.gridData.column - 1) * parent.cellWidth
|
||||||
local y = -(self.gridData.row * parent.cellHeight)
|
local y = -(selff.gridData.row * parent.cellHeight)
|
||||||
self:SetPoint("TOPLEFT", parent.frame, "TOPLEFT", x, y)
|
selff:SetPoint("TOPLEFT", parent.frame, "TOPLEFT", x, y)
|
||||||
self:SetWidth(parent.cellWidth * self.gridData.colspan)
|
selff:SetWidth(parent.cellWidth * selff.gridData.colspan)
|
||||||
self:SetHeight(parent.cellHeight * self.gridData.rowspan)
|
selff:SetHeight(parent.cellHeight * selff.gridData.rowspan)
|
||||||
end
|
end
|
||||||
frame.SetPos(frame)
|
frame.SetPos(frame)
|
||||||
|
|
||||||
@@ -262,7 +261,7 @@ StaticGridFrame = {
|
|||||||
return self
|
return self
|
||||||
end,
|
end,
|
||||||
---@param self StaticGridFrame
|
---@param self StaticGridFrame
|
||||||
---@param frame Frame
|
---@param frame Region
|
||||||
---@param rowspan number
|
---@param rowspan number
|
||||||
---@param colspan number
|
---@param colspan number
|
||||||
Add = function(self, frame, rowspan, colspan)
|
Add = function(self, frame, rowspan, colspan)
|
||||||
@@ -295,7 +294,9 @@ StaticGridFrame = {
|
|||||||
frame:SetWidth(self.cellWidth * colspan)
|
frame:SetWidth(self.cellWidth * colspan)
|
||||||
frame:SetHeight(self.cellHeight * rowspan)
|
frame:SetHeight(self.cellHeight * rowspan)
|
||||||
frame:SetPoint("TOPLEFT", self.frame, "TOPLEFT", x, y)
|
frame:SetPoint("TOPLEFT", self.frame, "TOPLEFT", x, y)
|
||||||
frame:SetParent(self.frame)
|
-- Region should have set parent...
|
||||||
|
---@diagnostic disable-next-line: undefined-field
|
||||||
|
if frame.SetParent then frame:SetParent(self.frame) end
|
||||||
for r = row, row + rowspan - 1 do
|
for r = row, row + rowspan - 1 do
|
||||||
for c = col, col + colspan - 1 do
|
for c = col, col + colspan - 1 do
|
||||||
self.occupancy[r][c] = true
|
self.occupancy[r][c] = true
|
||||||
@@ -312,8 +313,8 @@ StaticGridFrame = {
|
|||||||
self.frame:SetMovable(true)
|
self.frame:SetMovable(true)
|
||||||
self.frame:EnableMouse(true)
|
self.frame:EnableMouse(true)
|
||||||
self.frame:RegisterForDrag("LeftButton")
|
self.frame:RegisterForDrag("LeftButton")
|
||||||
self.frame:SetScript("OnDragStart", function(self) self:StartMoving() end)
|
self.frame:SetScript("OnDragStart", function(selff) selff:StartMoving() end)
|
||||||
self.frame:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end)
|
self.frame:SetScript("OnDragStop", function(selff) selff:StopMovingOrSizing() end)
|
||||||
end,
|
end,
|
||||||
Recalculate = function(self)
|
Recalculate = function(self)
|
||||||
for _, frame in pairs(self.frame:GetChildren()) do
|
for _, frame in pairs(self.frame:GetChildren()) do
|
||||||
@@ -460,18 +461,23 @@ function shared.Config.Init()
|
|||||||
---@param name string
|
---@param name string
|
||||||
---@param parent Frame
|
---@param parent Frame
|
||||||
---@param text string
|
---@param text string
|
||||||
---@param onDone fun(editBox: Frame)
|
---@param onDone fun(editBox: EditBox)
|
||||||
|
---@return GridFrame
|
||||||
local function CreateBasicSmallEditBox(name, parent, text, initialValue, onDone)
|
local function CreateBasicSmallEditBox(name, parent, text, initialValue, onDone)
|
||||||
local container = GridFrame.new(name, parent, 1, 1)
|
local container = GridFrame.new(name, parent, 1, 1)
|
||||||
|
---@type Frame
|
||||||
local editBoxFrame = CreateFrame("Frame", name .. "EditBoxFrame", container.frame)
|
local editBoxFrame = CreateFrame("Frame", name .. "EditBoxFrame", container.frame)
|
||||||
|
---@type EditBox
|
||||||
local editBox = CreateFrame("EditBox", name .. "EditBox", editBoxFrame)
|
local editBox = CreateFrame("EditBox", name .. "EditBox", editBoxFrame)
|
||||||
|
---@type Frame
|
||||||
local textFrame = CreateFrame("Frame", name .. "TextFrame", container.frame)
|
local textFrame = CreateFrame("Frame", name .. "TextFrame", container.frame)
|
||||||
|
---@type FontString
|
||||||
local textElement = textFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
local textElement = textFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||||
textElement:SetText(text)
|
textElement:SetText(text)
|
||||||
|
|
||||||
editBox:SetAutoFocus(false)
|
editBox:SetAutoFocus(false)
|
||||||
editBox:SetFontObject("GameFontNormal")
|
editBox:SetFontObject("GameFontNormal")
|
||||||
editBox:SetText(Heimdall_Data.config.spotter.throttleTime)
|
editBox:SetText("")
|
||||||
editBox:SetBackdrop({
|
editBox:SetBackdrop({
|
||||||
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
|
bgFile = "Interface/Tooltips/UI-Tooltip-Background",
|
||||||
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
|
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
|
||||||
@@ -500,12 +506,17 @@ function shared.Config.Init()
|
|||||||
---@param name string
|
---@param name string
|
||||||
---@param parent Frame
|
---@param parent Frame
|
||||||
---@param text string
|
---@param text string
|
||||||
---@param onDone fun(editBox: Frame)
|
---@param onDone fun(editBox: EditBox)
|
||||||
|
---@return GridFrame
|
||||||
local function CreateBasicBigEditBox(name, parent, text, initialValue, onDone)
|
local function CreateBasicBigEditBox(name, parent, text, initialValue, onDone)
|
||||||
local container = GridFrame.new(name, parent, 1, 100)
|
local container = GridFrame.new(name, parent, 1, 100)
|
||||||
|
---@type Frame
|
||||||
local editBoxFrame = CreateFrame("Frame", name .. "EditBoxFrame", container.frame)
|
local editBoxFrame = CreateFrame("Frame", name .. "EditBoxFrame", container.frame)
|
||||||
|
---@type EditBox
|
||||||
local editBox = CreateFrame("EditBox", name .. "EditBox", editBoxFrame)
|
local editBox = CreateFrame("EditBox", name .. "EditBox", editBoxFrame)
|
||||||
|
---@type Frame
|
||||||
local textFrame = CreateFrame("Frame", name .. "TextFrame", container.frame)
|
local textFrame = CreateFrame("Frame", name .. "TextFrame", container.frame)
|
||||||
|
---@type FontString
|
||||||
local textElement = textFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
local textElement = textFrame:CreateFontString(nil, "OVERLAY", "GameFontNormal")
|
||||||
textElement:SetText(text)
|
textElement:SetText(text)
|
||||||
|
|
||||||
@@ -553,7 +564,7 @@ function shared.Config.Init()
|
|||||||
configFrame.frame:SetScale(Heimdall_Data.config.scale)
|
configFrame.frame:SetScale(Heimdall_Data.config.scale)
|
||||||
else
|
else
|
||||||
print(string.format("Invalid scale: %s, please use numbers", text))
|
print(string.format("Invalid scale: %s, please use numbers", text))
|
||||||
self:SetText(Heimdall_Data.config.scale)
|
self:SetText(tostring(Heimdall_Data.config.scale))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
@@ -581,7 +592,7 @@ function shared.Config.Init()
|
|||||||
shared._L("english", Heimdall_Data.config.locale),
|
shared._L("english", Heimdall_Data.config.locale),
|
||||||
function()
|
function()
|
||||||
Heimdall_Data.config.locale = "en"
|
Heimdall_Data.config.locale = "en"
|
||||||
russian:UpdateColor(false)
|
if russian then russian:UpdateColor(false) end
|
||||||
return Heimdall_Data.config.locale == "en"
|
return Heimdall_Data.config.locale == "en"
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
@@ -607,7 +618,7 @@ function shared.Config.Init()
|
|||||||
spotterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
spotterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(spotterConfigFrame, 9, 3)
|
configFrame:Add(spotterConfigFrame, 9, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallSpotterConfigTitle",
|
"HeimdallSpotterConfigTitle",
|
||||||
spotterConfigFrame.frame,
|
spotterConfigFrame.frame,
|
||||||
shared._L("spotter", Heimdall_Data.config.locale),
|
shared._L("spotter", Heimdall_Data.config.locale),
|
||||||
@@ -743,7 +754,7 @@ function shared.Config.Init()
|
|||||||
whoerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
whoerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(whoerConfigFrame, 30, 6)
|
configFrame:Add(whoerConfigFrame, 30, 6)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallWhoerConfigTitle",
|
"HeimdallWhoerConfigTitle",
|
||||||
whoerConfigFrame.frame,
|
whoerConfigFrame.frame,
|
||||||
shared._L("whoer", Heimdall_Data.config.locale),
|
shared._L("whoer", Heimdall_Data.config.locale),
|
||||||
@@ -862,7 +873,7 @@ function shared.Config.Init()
|
|||||||
messengerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
messengerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(messengerConfigFrame, 6, 3)
|
configFrame:Add(messengerConfigFrame, 6, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallMessengerConfigTitle",
|
"HeimdallMessengerConfigTitle",
|
||||||
messengerConfigFrame.frame,
|
messengerConfigFrame.frame,
|
||||||
shared._L("messenger", Heimdall_Data.config.locale),
|
shared._L("messenger", Heimdall_Data.config.locale),
|
||||||
@@ -905,7 +916,7 @@ function shared.Config.Init()
|
|||||||
print("Interval set to", tostring(text))
|
print("Interval set to", tostring(text))
|
||||||
else
|
else
|
||||||
print("Invalid interval", tostring(text))
|
print("Invalid interval", tostring(text))
|
||||||
self:SetText(Heimdall_Data.config.messenger.interval)
|
self:SetText(tostring(Heimdall_Data.config.messenger.interval))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
@@ -919,7 +930,7 @@ function shared.Config.Init()
|
|||||||
deathReporterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
deathReporterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(deathReporterConfigFrame, 10, 3)
|
configFrame:Add(deathReporterConfigFrame, 10, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallDeathReporterConfigTitle",
|
"HeimdallDeathReporterConfigTitle",
|
||||||
deathReporterConfigFrame.frame,
|
deathReporterConfigFrame.frame,
|
||||||
shared._L("deathReporter", Heimdall_Data.config.locale),
|
shared._L("deathReporter", Heimdall_Data.config.locale),
|
||||||
@@ -974,7 +985,7 @@ function shared.Config.Init()
|
|||||||
print("Throttle time set to", tostring(text))
|
print("Throttle time set to", tostring(text))
|
||||||
else
|
else
|
||||||
print("Invalid throttle time", tostring(text))
|
print("Invalid throttle time", tostring(text))
|
||||||
self:SetText(Heimdall_Data.config.deathReporter.throttle)
|
self:SetText(tostring(Heimdall_Data.config.deathReporter.throttle))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
@@ -1038,7 +1049,7 @@ function shared.Config.Init()
|
|||||||
inviterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
inviterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(inviterConfigFrame, 13, 3)
|
configFrame:Add(inviterConfigFrame, 13, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallInviterConfigTitle",
|
"HeimdallInviterConfigTitle",
|
||||||
inviterConfigFrame.frame,
|
inviterConfigFrame.frame,
|
||||||
shared._L("inviter", Heimdall_Data.config.locale),
|
shared._L("inviter", Heimdall_Data.config.locale),
|
||||||
@@ -1196,7 +1207,7 @@ function shared.Config.Init()
|
|||||||
duelerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
duelerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(duelerConfigFrame, 4, 3)
|
configFrame:Add(duelerConfigFrame, 4, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallDuelerConfigTitle",
|
"HeimdallDuelerConfigTitle",
|
||||||
duelerConfigFrame.frame,
|
duelerConfigFrame.frame,
|
||||||
shared._L("dueler", Heimdall_Data.config.locale),
|
shared._L("dueler", Heimdall_Data.config.locale),
|
||||||
@@ -1247,7 +1258,7 @@ function shared.Config.Init()
|
|||||||
agentTrackerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
agentTrackerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(agentTrackerConfigFrame, 5, 3)
|
configFrame:Add(agentTrackerConfigFrame, 5, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallAgentTrackerConfigTitle",
|
"HeimdallAgentTrackerConfigTitle",
|
||||||
agentTrackerConfigFrame.frame,
|
agentTrackerConfigFrame.frame,
|
||||||
shared._L("agentTracker", Heimdall_Data.config.locale),
|
shared._L("agentTracker", Heimdall_Data.config.locale),
|
||||||
@@ -1300,7 +1311,7 @@ function shared.Config.Init()
|
|||||||
stinkyTrackerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
stinkyTrackerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(stinkyTrackerConfigFrame, 5, 3)
|
configFrame:Add(stinkyTrackerConfigFrame, 5, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallStinkyTrackerConfigTitle",
|
"HeimdallStinkyTrackerConfigTitle",
|
||||||
stinkyTrackerConfigFrame.frame,
|
stinkyTrackerConfigFrame.frame,
|
||||||
shared._L("stinkyTracker", Heimdall_Data.config.locale),
|
shared._L("stinkyTracker", Heimdall_Data.config.locale),
|
||||||
@@ -1353,7 +1364,7 @@ function shared.Config.Init()
|
|||||||
emoterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
emoterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(emoterConfigFrame, 7, 3)
|
configFrame:Add(emoterConfigFrame, 7, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallEmoterConfigTitle",
|
"HeimdallEmoterConfigTitle",
|
||||||
emoterConfigFrame.frame,
|
emoterConfigFrame.frame,
|
||||||
shared._L("emoter", Heimdall_Data.config.locale),
|
shared._L("emoter", Heimdall_Data.config.locale),
|
||||||
@@ -1424,7 +1435,7 @@ function shared.Config.Init()
|
|||||||
echoerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
echoerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(echoerConfigFrame, 7, 3)
|
configFrame:Add(echoerConfigFrame, 7, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallEchoerConfigTitle",
|
"HeimdallEchoerConfigTitle",
|
||||||
echoerConfigFrame.frame,
|
echoerConfigFrame.frame,
|
||||||
shared._L("echoer", Heimdall_Data.config.locale),
|
shared._L("echoer", Heimdall_Data.config.locale),
|
||||||
@@ -1495,7 +1506,7 @@ function shared.Config.Init()
|
|||||||
commanderConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
commanderConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(commanderConfigFrame, 10, 3)
|
configFrame:Add(commanderConfigFrame, 10, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallCommanderConfigTitle",
|
"HeimdallCommanderConfigTitle",
|
||||||
commanderConfigFrame.frame,
|
commanderConfigFrame.frame,
|
||||||
shared._L("commander", Heimdall_Data.config.locale),
|
shared._L("commander", Heimdall_Data.config.locale),
|
||||||
@@ -1578,7 +1589,7 @@ function shared.Config.Init()
|
|||||||
macroerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
macroerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(macroerConfigFrame, 6, 3)
|
configFrame:Add(macroerConfigFrame, 6, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallMacroerConfigTitle",
|
"HeimdallMacroerConfigTitle",
|
||||||
macroerConfigFrame.frame,
|
macroerConfigFrame.frame,
|
||||||
shared._L("macroer", Heimdall_Data.config.locale),
|
shared._L("macroer", Heimdall_Data.config.locale),
|
||||||
@@ -1629,7 +1640,7 @@ function shared.Config.Init()
|
|||||||
combatAlerterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
combatAlerterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(combatAlerterConfigFrame, 5, 3)
|
configFrame:Add(combatAlerterConfigFrame, 5, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallCombatAlerterConfigTitle",
|
"HeimdallCombatAlerterConfigTitle",
|
||||||
combatAlerterConfigFrame.frame,
|
combatAlerterConfigFrame.frame,
|
||||||
shared._L("combatAlerter", Heimdall_Data.config.locale),
|
shared._L("combatAlerter", Heimdall_Data.config.locale),
|
||||||
@@ -1682,7 +1693,7 @@ function shared.Config.Init()
|
|||||||
snifferConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
snifferConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(snifferConfigFrame, 8, 3)
|
configFrame:Add(snifferConfigFrame, 8, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallSnifferConfigTitle",
|
"HeimdallSnifferConfigTitle",
|
||||||
snifferConfigFrame.frame,
|
snifferConfigFrame.frame,
|
||||||
shared._L("sniffer", Heimdall_Data.config.locale),
|
shared._L("sniffer", Heimdall_Data.config.locale),
|
||||||
@@ -1783,7 +1794,7 @@ function shared.Config.Init()
|
|||||||
bonkDetectorConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
bonkDetectorConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(bonkDetectorConfigFrame, 7, 3)
|
configFrame:Add(bonkDetectorConfigFrame, 7, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallBonkDetectorConfigTitle",
|
"HeimdallBonkDetectorConfigTitle",
|
||||||
bonkDetectorConfigFrame.frame,
|
bonkDetectorConfigFrame.frame,
|
||||||
shared._L("bonkDetector", Heimdall_Data.config.locale),
|
shared._L("bonkDetector", Heimdall_Data.config.locale),
|
||||||
@@ -1855,7 +1866,7 @@ function shared.Config.Init()
|
|||||||
minimapTaggerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
minimapTaggerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(minimapTaggerConfigFrame, 18, 6)
|
configFrame:Add(minimapTaggerConfigFrame, 18, 6)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallMinimapTaggerConfigTitle",
|
"HeimdallMinimapTaggerConfigTitle",
|
||||||
minimapTaggerConfigFrame.frame,
|
minimapTaggerConfigFrame.frame,
|
||||||
shared._L("minimapTagger", Heimdall_Data.config.locale),
|
shared._L("minimapTagger", Heimdall_Data.config.locale),
|
||||||
@@ -1900,7 +1911,7 @@ function shared.Config.Init()
|
|||||||
)
|
)
|
||||||
minimapTaggerConfigFrame:Add(channels, 2, 3)
|
minimapTaggerConfigFrame:Add(channels, 2, 3)
|
||||||
|
|
||||||
local scale = CreateBasicSmallEditBox(
|
scale = CreateBasicSmallEditBox(
|
||||||
"HeimdallMinimapTaggerConfigScale",
|
"HeimdallMinimapTaggerConfigScale",
|
||||||
minimapTaggerConfigFrame.frame,
|
minimapTaggerConfigFrame.frame,
|
||||||
shared._L("scale", Heimdall_Data.config.locale),
|
shared._L("scale", Heimdall_Data.config.locale),
|
||||||
@@ -2223,7 +2234,7 @@ function shared.Config.Init()
|
|||||||
noterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
noterConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(noterConfigFrame, 7, 3)
|
configFrame:Add(noterConfigFrame, 7, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallNoterConfigTitle",
|
"HeimdallNoterConfigTitle",
|
||||||
noterConfigFrame.frame,
|
noterConfigFrame.frame,
|
||||||
shared._L("noter", Heimdall_Data.config.locale),
|
shared._L("noter", Heimdall_Data.config.locale),
|
||||||
@@ -2296,7 +2307,7 @@ function shared.Config.Init()
|
|||||||
networkConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
networkConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(networkConfigFrame, 11, 3)
|
configFrame:Add(networkConfigFrame, 11, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallNetworkConfigTitle",
|
"HeimdallNetworkConfigTitle",
|
||||||
networkConfigFrame.frame,
|
networkConfigFrame.frame,
|
||||||
shared._L("network", Heimdall_Data.config.locale),
|
shared._L("network", Heimdall_Data.config.locale),
|
||||||
@@ -2368,7 +2379,7 @@ function shared.Config.Init()
|
|||||||
networkMessengerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
networkMessengerConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(networkMessengerConfigFrame, 5, 3)
|
configFrame:Add(networkMessengerConfigFrame, 5, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallNetworkMessengerConfigTitle",
|
"HeimdallNetworkMessengerConfigTitle",
|
||||||
networkMessengerConfigFrame.frame,
|
networkMessengerConfigFrame.frame,
|
||||||
shared._L("networkMessenger", Heimdall_Data.config.locale),
|
shared._L("networkMessenger", Heimdall_Data.config.locale),
|
||||||
@@ -2426,7 +2437,7 @@ function shared.Config.Init()
|
|||||||
achievementSnifferConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
achievementSnifferConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(achievementSnifferConfigFrame, 14, 3)
|
configFrame:Add(achievementSnifferConfigFrame, 14, 3)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallAchievementSnifferConfigTitle",
|
"HeimdallAchievementSnifferConfigTitle",
|
||||||
achievementSnifferConfigFrame.frame,
|
achievementSnifferConfigFrame.frame,
|
||||||
shared._L("achievementSniffer", Heimdall_Data.config.locale),
|
shared._L("achievementSniffer", Heimdall_Data.config.locale),
|
||||||
@@ -2538,7 +2549,7 @@ function shared.Config.Init()
|
|||||||
addonPrefixConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
addonPrefixConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(addonPrefixConfigFrame, 5, 1)
|
configFrame:Add(addonPrefixConfigFrame, 5, 1)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallAddonPrefixConfigTitle",
|
"HeimdallAddonPrefixConfigTitle",
|
||||||
addonPrefixConfigFrame.frame,
|
addonPrefixConfigFrame.frame,
|
||||||
shared._L("addonPrefix", Heimdall_Data.config.locale),
|
shared._L("addonPrefix", Heimdall_Data.config.locale),
|
||||||
@@ -2566,7 +2577,7 @@ function shared.Config.Init()
|
|||||||
whisperNotifyConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
whisperNotifyConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(whisperNotifyConfigFrame, 14, 1)
|
configFrame:Add(whisperNotifyConfigFrame, 14, 1)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallWhisperNotifyConfigTitle",
|
"HeimdallWhisperNotifyConfigTitle",
|
||||||
whisperNotifyConfigFrame.frame,
|
whisperNotifyConfigFrame.frame,
|
||||||
shared._L("whisperNotify", Heimdall_Data.config.locale),
|
shared._L("whisperNotify", Heimdall_Data.config.locale),
|
||||||
@@ -2596,7 +2607,7 @@ function shared.Config.Init()
|
|||||||
-- Why do 17 rows of content fit into a frame that is 14 rows?
|
-- Why do 17 rows of content fit into a frame that is 14 rows?
|
||||||
-- I don't know, at this point I can't be fucked to fix it, the display is minimally functional
|
-- I don't know, at this point I can't be fucked to fix it, the display is minimally functional
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallStinkiesConfigTitle",
|
"HeimdallStinkiesConfigTitle",
|
||||||
stinkiesConfigFrame.frame,
|
stinkiesConfigFrame.frame,
|
||||||
shared._L("stinkies", Heimdall_Data.config.locale),
|
shared._L("stinkies", Heimdall_Data.config.locale),
|
||||||
@@ -2624,7 +2635,7 @@ function shared.Config.Init()
|
|||||||
channelLocaleConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
channelLocaleConfigFrame.frame:SetBackdropColor(r, g, b, 0.3)
|
||||||
configFrame:Add(channelLocaleConfigFrame, 14, 1)
|
configFrame:Add(channelLocaleConfigFrame, 14, 1)
|
||||||
|
|
||||||
local title = CreateFancyText(
|
title = CreateFancyText(
|
||||||
"HeimdallChannelLocaleConfigTitle",
|
"HeimdallChannelLocaleConfigTitle",
|
||||||
channelLocaleConfigFrame.frame,
|
channelLocaleConfigFrame.frame,
|
||||||
shared._L("channelLocale", Heimdall_Data.config.locale),
|
shared._L("channelLocale", Heimdall_Data.config.locale),
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
local addonname, shared = ...
|
local _, shared = ...
|
||||||
---@cast shared HeimdallShared
|
---@cast shared HeimdallShared
|
||||||
---@cast addonname string
|
|
||||||
local ModuleName = "Configurator"
|
local ModuleName = "Configurator"
|
||||||
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
shared.Configurator = {}
|
shared.Configurator = {}
|
||||||
function shared.Configurator.Init() print("[Heimdall] Configurator module loaded") end
|
function shared.Configurator.Init() print(string.format("[Heimdall] %s module loaded", ModuleName)) end
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
local addonname, shared = ...
|
local _, shared = ...
|
||||||
---@cast shared HeimdallShared
|
---@cast shared HeimdallShared
|
||||||
---@cast addonname string
|
|
||||||
local ModuleName = "DeathReporter"
|
local ModuleName = "DeathReporter"
|
||||||
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
@@ -183,32 +182,33 @@ function shared.DeathReporter.Init()
|
|||||||
-- print(string.format("[%s] Received combat log event", ModuleName))
|
-- print(string.format("[%s] Received combat log event", ModuleName))
|
||||||
-- end
|
-- end
|
||||||
if not Heimdall_Data.config.deathReporter.enabled then return end
|
if not Heimdall_Data.config.deathReporter.enabled then return end
|
||||||
local overkill, err = CLEUParser.GetOverkill(...)
|
local overkill, source, destination, spellName, sourceGUID, destinationGUID, err
|
||||||
|
overkill, err = CLEUParser.GetOverkill(...)
|
||||||
if not err and overkill > 0 then
|
if not err and overkill > 0 then
|
||||||
local source, err = CLEUParser.GetSourceName(...)
|
source, err = CLEUParser.GetSourceName(...)
|
||||||
if err then
|
if err then
|
||||||
source = "unknown"
|
source = "unknown"
|
||||||
if Heimdall_Data.config.deathReporter.debug then
|
if Heimdall_Data.config.deathReporter.debug then
|
||||||
print(string.format("[%s] Error getting source name", ModuleName))
|
print(string.format("[%s] Error getting source name", ModuleName))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local destination, err = CLEUParser.GetDestName(...)
|
destination, err = CLEUParser.GetDestName(...)
|
||||||
if err then
|
if err then
|
||||||
destination = "unknown"
|
destination = "unknown"
|
||||||
if Heimdall_Data.config.deathReporter.debug then
|
if Heimdall_Data.config.deathReporter.debug then
|
||||||
print(string.format("[%s] Error getting destination name", ModuleName))
|
print(string.format("[%s] Error getting destination name", ModuleName))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local spellName, err = CLEUParser.GetSpellName(...)
|
spellName, err = CLEUParser.GetSpellName(...)
|
||||||
if err then
|
if err then
|
||||||
spellName = "unknown"
|
spellName = "unknown"
|
||||||
if Heimdall_Data.config.deathReporter.debug then
|
if Heimdall_Data.config.deathReporter.debug then
|
||||||
print(string.format("[%s] Error getting spell name", ModuleName))
|
print(string.format("[%s] Error getting spell name", ModuleName))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
local sourceGUID, err = CLEUParser.GetSourceGUID(...)
|
sourceGUID, err = CLEUParser.GetSourceGUID(...)
|
||||||
if err or not string.match(sourceGUID, "Player") then return end
|
if err or not string.match(sourceGUID, "Player") then return end
|
||||||
local destinationGUID, err = CLEUParser.GetDestGUID(...)
|
destinationGUID, err = CLEUParser.GetDestGUID(...)
|
||||||
if err or not string.match(destinationGUID, "Player") then return end
|
if err or not string.match(destinationGUID, "Player") then return end
|
||||||
RegisterDeath(source, destination, spellName)
|
RegisterDeath(source, destination, spellName)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
local addonname, shared = ...
|
local _, shared = ...
|
||||||
---@cast shared HeimdallShared
|
---@cast shared HeimdallShared
|
||||||
---@cast addonname string
|
|
||||||
local ModuleName = "Dueler"
|
local ModuleName = "Dueler"
|
||||||
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
local addonname, shared = ...
|
local _, shared = ...
|
||||||
---@cast shared HeimdallShared
|
---@cast shared HeimdallShared
|
||||||
---@cast addonname string
|
|
||||||
|
|
||||||
if not shared.dumpTable then
|
if not shared.dumpTable then
|
||||||
---@param table table
|
---@param table table
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
local addonname, shared = ...
|
local _, shared = ...
|
||||||
---@cast shared HeimdallShared
|
---@cast shared HeimdallShared
|
||||||
---@cast addonname string
|
|
||||||
local ModuleName = "Echoer"
|
local ModuleName = "Echoer"
|
||||||
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
@@ -44,11 +43,11 @@ function shared.Echoer.Init()
|
|||||||
if Heimdall_Data.config.echoer.debug then
|
if Heimdall_Data.config.echoer.debug then
|
||||||
print(string.format("[%s] Found echo command in message: %s", ModuleName, msg))
|
print(string.format("[%s] Found echo command in message: %s", ModuleName, msg))
|
||||||
end
|
end
|
||||||
local msg = string.sub(msg, string.len(Heimdall_Data.config.echoer.prefix) + 1)
|
local echomsg = string.sub(msg, string.len(Heimdall_Data.config.echoer.prefix) + 1)
|
||||||
if Heimdall_Data.config.echoer.debug then
|
if Heimdall_Data.config.echoer.debug then
|
||||||
print(string.format("[%s] Echoing message: %s", ModuleName, msg))
|
print(string.format("[%s] Echoing message: %s", ModuleName, echomsg))
|
||||||
end
|
end
|
||||||
SendChatMessage(msg, "SAY")
|
SendChatMessage(echomsg, "SAY")
|
||||||
elseif Heimdall_Data.config.echoer.debug then
|
elseif Heimdall_Data.config.echoer.debug then
|
||||||
print(string.format("[%s] Message does not start with echo prefix", ModuleName))
|
print(string.format("[%s] Message does not start with echo prefix", ModuleName))
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
local addonname, shared = ...
|
local _, shared = ...
|
||||||
---@cast shared HeimdallShared
|
---@cast shared HeimdallShared
|
||||||
---@cast addonname string
|
|
||||||
local ModuleName = "Inviter"
|
local ModuleName = "Inviter"
|
||||||
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
shared.Inviter = {}
|
shared.Inviter = {}
|
||||||
function shared.Inviter.Init()
|
function shared.Inviter.Init()
|
||||||
|
-- Fallback for old config
|
||||||
if type(Heimdall_Data.config.inviter.listeningChannel) == "string" then
|
if type(Heimdall_Data.config.inviter.listeningChannel) == "string" then
|
||||||
Heimdall_Data.config.inviter.listeningChannel = {
|
Heimdall_Data.config.inviter.listeningChannel = {
|
||||||
[Heimdall_Data.config.inviter.listeningChannel] = true,
|
[Heimdall_Data.config.inviter.listeningChannel] = true,
|
||||||
@@ -102,13 +102,18 @@ function shared.Inviter.Init()
|
|||||||
local frame = FindPlayerRaidFrame(name)
|
local frame = FindPlayerRaidFrame(name)
|
||||||
if frame then
|
if frame then
|
||||||
playerButtons[name] = frame
|
playerButtons[name] = frame
|
||||||
|
-- All of these are ELVUI specific so they won't be in our meta...
|
||||||
|
---@diagnostic disable-next-line: undefined-field
|
||||||
local button = framePool[frame.unit]
|
local button = framePool[frame.unit]
|
||||||
or CreateFrame(
|
or CreateFrame(
|
||||||
"Button",
|
"Button",
|
||||||
|
---@diagnostic disable-next-line: undefined-field
|
||||||
string.format("HeimdallKickButton%s", frame.unit, frame, "SecureActionButtonTemplate")
|
string.format("HeimdallKickButton%s", frame.unit, frame, "SecureActionButtonTemplate")
|
||||||
)
|
)
|
||||||
|
---@diagnostic disable-next-line: undefined-field
|
||||||
framePool[frame.unit] = button
|
framePool[frame.unit] = button
|
||||||
|
|
||||||
|
---@diagnostic disable-next-line: undefined-field
|
||||||
button:SetSize(frame.UNIT_WIDTH / 2, frame.UNIT_HEIGHT / 2)
|
button:SetSize(frame.UNIT_WIDTH / 2, frame.UNIT_HEIGHT / 2)
|
||||||
button:SetPoint("CENTER", frame, "CENTER", 0, 0)
|
button:SetPoint("CENTER", frame, "CENTER", 0, 0)
|
||||||
button:SetNormalTexture("Interface\\Buttons\\UI-GroupLoot-KickIcon")
|
button:SetNormalTexture("Interface\\Buttons\\UI-GroupLoot-KickIcon")
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
local addonname, shared = ...
|
local _, shared = ...
|
||||||
---@cast shared HeimdallShared
|
---@cast shared HeimdallShared
|
||||||
---@cast addonname string
|
|
||||||
local ModuleName = "Macroer"
|
local ModuleName = "Macroer"
|
||||||
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
@@ -82,6 +81,7 @@ function shared.Macroer.Init()
|
|||||||
end
|
end
|
||||||
|
|
||||||
local idx = FindOrCreateMacro("HeimdallTarget")
|
local idx = FindOrCreateMacro("HeimdallTarget")
|
||||||
|
---@diagnostic disable-next-line: param-type-mismatch
|
||||||
local body = strjoin("\n", unpack(lines))
|
local body = strjoin("\n", unpack(lines))
|
||||||
if Heimdall_Data.config.macroer.debug then
|
if Heimdall_Data.config.macroer.debug then
|
||||||
print(string.format("[%s] Updating macro with %d lines", ModuleName, #lines))
|
print(string.format("[%s] Updating macro with %d lines", ModuleName, #lines))
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
local addonname, shared = ...
|
local _, shared = ...
|
||||||
---@cast shared HeimdallShared
|
---@cast shared HeimdallShared
|
||||||
---@cast addonname string
|
|
||||||
local ModuleName = "Messenger"
|
local ModuleName = "Messenger"
|
||||||
|
|
||||||
---@diagnostic disable-next-line: missing-fields
|
---@diagnostic disable-next-line: missing-fields
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
local addonname, shared = ...
|
local _, shared = ...
|
||||||
---@cast shared HeimdallShared
|
---@cast shared HeimdallShared
|
||||||
---@cast addonname string
|
|
||||||
local ModuleName = "MinimapTagger"
|
local ModuleName = "MinimapTagger"
|
||||||
local HeimdallRoot = "Interface\\AddOns\\Heimdall\\"
|
local HeimdallRoot = "Interface\\AddOns\\Heimdall\\"
|
||||||
local SoundRoot = HeimdallRoot .. "Sounds\\"
|
local SoundRoot = HeimdallRoot .. "Sounds\\"
|
||||||
|
|||||||
Reference in New Issue
Block a user