diff --git a/.luarc.json b/.luarc.json index e7d984b598..34c522a120 100644 --- a/.luarc.json +++ b/.luarc.json @@ -238,7 +238,9 @@ "CreateScrollBoxListLinearView", "CreateDataProvider", "UIMenuButtonStretchMixin", - "ToggleDropDownMenu" + "ToggleDropDownMenu", + "GetPrimaryTalentTree", + "GetTalentTabInfo" ], "runtime.version": "Lua 5.1", "workspace.ignoreDir": [ diff --git a/WeakAuras/BuffTrigger2.lua b/WeakAuras/BuffTrigger2.lua index 58a4fed459..8e385bd729 100644 --- a/WeakAuras/BuffTrigger2.lua +++ b/WeakAuras/BuffTrigger2.lua @@ -2302,7 +2302,7 @@ local function EventHandler(frame, event, arg1, arg2, ...) -- With newApi we have TOOLTIP_DATA_UPDATE to update the tooltips if not newAPI then C_Timer.After(3, function() - for unit, matchtDataPerUnit in pairs(matchData) do + for unit, matchDataPerUnit in pairs(matchData) do EventHandler(frame, "UNIT_AURA", unit) end end) @@ -2398,7 +2398,7 @@ local PerUnitFrames = { -- We check whether we are already registered for the given pet mode, -- and unregister as needed by tracking the number of calls to Register with different -- petModes - -- All of the dancing is to not register for UNIT_IN_RANGE_UPDATE for pets unless explictly asked for + -- All of the dancing is to not register for UNIT_IN_RANGE_UPDATE for pets unless explicitly asked for local unitTypePetMode = GetOrCreateSubTable(self.unitTypePetMode, event, unitType) --- @type any local mode = false diff --git a/WeakAuras/GenericTrigger.lua b/WeakAuras/GenericTrigger.lua index 8fbeca0791..07cebaa43b 100644 --- a/WeakAuras/GenericTrigger.lua +++ b/WeakAuras/GenericTrigger.lua @@ -2649,8 +2649,8 @@ do end ---@param id string - ---@param ignoreSpellKnown boolean - ---@param followoverride boolean + ---@param ignoreSpellKnown? boolean + ---@param followoverride? boolean ---@return integer? charges ---@return integer? chargesMax ---@return integer? count diff --git a/WeakAuras/Init.lua b/WeakAuras/Init.lua index 6838dd961a..650d0aa6ab 100644 --- a/WeakAuras/Init.lua +++ b/WeakAuras/Init.lua @@ -192,8 +192,8 @@ Private.frames = {} ---@field GetNameAndIcon (fun(trigger: triggerData): string?, string?)|nil ---@field iconFunc (fun(trigger: triggerData): string?)|nil ---@field nameFunc (fun(trigger: triggerData): string?)|nil ----@field events (fun(tigger: triggerData): table)|nil ----@field internal_events (fun(tigger: triggerData): table)|nil +---@field events (fun(trigger: triggerData): table)|nil +---@field internal_events (fun(trigger: triggerData): table)|nil ---@field name string ---@field statesParamater "unit"|"one"|"all"|nil ---@field progressType "timed"|"static"|"none" diff --git a/WeakAuras/Prototypes.lua b/WeakAuras/Prototypes.lua index e716a0656f..923655db92 100644 --- a/WeakAuras/Prototypes.lua +++ b/WeakAuras/Prototypes.lua @@ -7277,7 +7277,7 @@ Private.event_prototypes = { type = "description", display = "", text = function() - return L["Note: This trigger internally stores the shape shift positon, and thus is incompatible with learning stances on the fly, like e.g. the Gladiator Rune."] + return L["Note: This trigger internally stores the shapeshift position, and thus is incompatible with learning stances on the fly, like e.g. the Gladiator Rune."] end, hidden = not (C_Seasons and C_Seasons.GetActiveSeason and C_Seasons.GetActiveSeason() == 2), }, diff --git a/WeakAuras/SubRegionTypes/Glow.lua b/WeakAuras/SubRegionTypes/Glow.lua index b8efcd2ceb..d719430f5e 100644 --- a/WeakAuras/SubRegionTypes/Glow.lua +++ b/WeakAuras/SubRegionTypes/Glow.lua @@ -255,7 +255,7 @@ local funcs = { if self.parentRegionType ~= "aurabar" then self.parent:AnchorSubRegion(self, "area", "region") end - else -- noop function in case of unsuported glow + else -- noop function in case of unsupported glow self.glowStart = function() end self.glowStop = function() end end diff --git a/WeakAuras/WeakAuras.lua b/WeakAuras/WeakAuras.lua index 07a76b774c..8664b00296 100644 --- a/WeakAuras/WeakAuras.lua +++ b/WeakAuras/WeakAuras.lua @@ -453,7 +453,7 @@ end ---@param default table ---@param addDefaultsForNewAura function ---@param properties table ----@param supportsAdd boolean +---@param supportsAdd? boolean function WeakAuras.RegisterSubRegionType(name, displayName, supportFunction, createFunction, modifyFunction, onAcquire, onRelease, default, addDefaultsForNewAura, properties, supportsAdd) if not(name) then error("Improper arguments to WeakAuras.RegisterSubRegionType - name is not defined", 2); @@ -3928,7 +3928,7 @@ end -- The constants table has weak keys do local function CompareProgressValueTables(a, b) - -- For auto/manual progreess, only compare a[] with b[1] + -- For auto/manual progress, only compare a[] with b[1] if a[1] == -1 or a[1] == 0 then return a[1] == b[1] end @@ -5304,6 +5304,7 @@ local function ensureMouseFrame() if (mouseFrame) then return; end + ---@class Frame mouseFrame = CreateFrame("Frame", "WeakAurasAttachToMouseFrame", UIParent); mouseFrame.attachedVisibleFrames = {}; mouseFrame:SetWidth(1); @@ -6009,7 +6010,7 @@ do end ---@param unit UnitToken - ---@return boolean result + ---@return boolean? result function WeakAuras.IsUntrackableSoftTarget(unit) if not Private.soft_target_cvars[unit] then return end -- technically this is incorrect if user doesn't have KBM and sets CVar to "2" (KBM only) diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua index f76f0b444c..65c3dd8e01 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasDisplayButton.lua @@ -1049,13 +1049,13 @@ local methods = { Show_Long_Tooltip(self.frame, self.frame.description); end end, - ["StartGrouping"] = function(self, groupingData, selected, groupingGroup, childOfGrouing) + ["StartGrouping"] = function(self, groupingData, selected, groupingGroup, childOfGrouping) self.grouping = groupingData; self:UpdateIconsVisible() if(selected) then self.frame:SetScript("OnClick", self.callbacks.OnClickGroupingSelf); self:SetDescription(L["Cancel"], L["Do not group this display"]); - elseif (childOfGrouing) then + elseif (childOfGrouping) then self:Disable(); else if(self.data.regionType == "dynamicgroup" and groupingGroup) then @@ -1767,6 +1767,7 @@ Constructor local function Constructor() local name = "WeakAurasDisplayButton"..AceGUI:GetNextWidgetNum(Type); + ---@class Button local button = CreateFrame("Button", name, UIParent, "OptionsListButtonTemplate"); button:SetHeight(32); button:SetWidth(1000); @@ -1806,6 +1807,7 @@ local function Constructor() button.description = {}; + ---@class Button local view = CreateFrame("Button", nil, button); button.view = view; view:SetWidth(16); @@ -1915,6 +1917,7 @@ local function Constructor() downgroup:SetScript("OnLeave", Hide_Tooltip); downgroup:Hide(); + ---@class Button local expand = CreateFrame("Button", nil, button); button.expand = expand; expand.expanded = true; diff --git a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasScrollArea.lua b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasScrollArea.lua index b886637025..6df82397cb 100644 --- a/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasScrollArea.lua +++ b/WeakAurasOptions/AceGUI-Widgets/AceGUIWidget-WeakAurasScrollArea.lua @@ -1,7 +1,7 @@ --[[----------------------------------------------------------------------------- ScrollArea Widget Plain widget that scrolls a content widget and doesn't grow in height. -Heavly based on AceGUIContainer-ScrollFrame +Heavily based on AceGUIContainer-ScrollFrame -------------------------------------------------------------------------------]] local Type, Version = "WeakAurasScrollArea", 1 local AceGUI = LibStub and LibStub("AceGUI-3.0", true) @@ -103,7 +103,7 @@ local methods = { local status = self.localstatus local height, viewheight = self.scrollframe:GetHeight(), self.content:GetHeight() local offset = status.offset or 0 - -- Give us a margin of error of 2 pixels to stop some conditions that i would blame on floating point inaccuracys + -- Give us a margin of error of 2 pixels to stop some conditions that i would blame on floating point inaccuracies -- No-one is going to miss 2 pixels at the bottom of the frame, anyhow! if viewheight < height + 2 then if self.scrollBarShown then diff --git a/WeakAurasOptions/AceGUI-Widgets/WeakAurasStatusbarAtlasWidget.lua b/WeakAurasOptions/AceGUI-Widgets/WeakAurasStatusbarAtlasWidget.lua index 26733405ee..464d11b617 100644 --- a/WeakAurasOptions/AceGUI-Widgets/WeakAurasStatusbarAtlasWidget.lua +++ b/WeakAurasOptions/AceGUI-Widgets/WeakAurasStatusbarAtlasWidget.lua @@ -31,6 +31,7 @@ do if next(contentFrameCache) then frame = table.remove(contentFrameCache) else + ---@class Button frame = CreateFrame("Button", nil, UIParent) --frame:SetWidth(200) frame:SetHeight(18) diff --git a/WeakAurasOptions/RegionOptions/Icon.lua b/WeakAurasOptions/RegionOptions/Icon.lua index 74c075d2db..41f422bd27 100644 --- a/WeakAurasOptions/RegionOptions/Icon.lua +++ b/WeakAurasOptions/RegionOptions/Icon.lua @@ -306,6 +306,7 @@ local function createOptions(id, data) end local function createThumbnail() + ---@class frame: FrameScriptObject local frame = CreateFrame("Frame", nil, UIParent) local icon = frame:CreateTexture(); icon:SetTexture("Interface\\Icons\\INV_Misc_QuestionMark"); diff --git a/WeakAurasOptions/RegionOptions/Model.lua b/WeakAurasOptions/RegionOptions/Model.lua index 5b74c27d58..5ab54e239f 100644 --- a/WeakAurasOptions/RegionOptions/Model.lua +++ b/WeakAurasOptions/RegionOptions/Model.lua @@ -225,13 +225,14 @@ local function createOptions(id, data) }; end --- Duplicated because Private does not exist when we want to create the first thumnail +-- Duplicated because Private does not exist when we want to create the first thumbnail local function ModelSetTransformFixed(self, tx, ty, tz, rx, ry, rz, s) -- In Dragonflight the api changed, this converts to the new api self:SetTransform(CreateVector3D(tx, ty, tz), CreateVector3D(rx, ry, rz), -s) end local function createThumbnail() + ---@class frame local borderframe = CreateFrame("Frame", nil, UIParent); borderframe:SetWidth(32); borderframe:SetHeight(32); @@ -241,6 +242,7 @@ local function createThumbnail() border:SetTexture("Interface\\BUTTONS\\UI-Quickslot2.blp"); border:SetTexCoord(0.2, 0.8, 0.2, 0.8); + ---@class Model local model = CreateFrame("PlayerModel", nil, borderframe); borderframe.model = model; model.SetTransformFixed = ModelSetTransformFixed diff --git a/WeakAurasOptions/WeakAurasOptions.lua b/WeakAurasOptions/WeakAurasOptions.lua index 0c3d6e5d78..192b1b32e9 100644 --- a/WeakAurasOptions/WeakAurasOptions.lua +++ b/WeakAurasOptions/WeakAurasOptions.lua @@ -1624,6 +1624,7 @@ end function OptionsPrivate.DropIndicator() local indicator = frame.dropIndicator if not indicator then + ---@class Frame indicator = CreateFrame("Frame", "WeakAuras_DropIndicator") indicator:SetHeight(4) indicator:SetFrameStrata("FULLSCREEN") diff --git a/cspell.json b/cspell.json index 11938e7546..7456bbcd81 100644 --- a/cspell.json +++ b/cspell.json @@ -1,18 +1,22 @@ { "version": "0.2", "language": "en-US, en-GB", - "ignoreRegExpList": [ - "\\((.+?)\\)" - ], + "allowCompoundWords": true, + "ignoreRegExpList": ["\\((.+?)\\)"], "ignorePaths": [ "WeakAurasModelPaths", + "WeakAurasTemplates", + "WeakAuras/Atlas_*.lua", "WeakAuras/Types*.lua", "WeakAuras/Libs", ".luacheckrc" ], "words": [ + "Aberrus", "AceGUIWidgetLSMlists", "Adamantite", + "Adjusteded", + "AGSMW", "Ahn'Qiraj", "Akama", "Akil'zon", @@ -108,6 +112,7 @@ "Frostwyrm", "ftcsv", "funcs", + "Funkeh", "Gahz'ranka", "Galmok", "Garr", @@ -261,7 +266,11 @@ "scaley", "Scorpid", "scrollbg", + "sealofsalvation", "setfenv", + "sfgg", + "sfng", + "sfsg", "Shahraz", "Shazzrah", "Shoop", @@ -273,6 +282,7 @@ "SOUNDFX", "spammy", "spellid", + "Stealthed", "Sulfuron", "Taijitu", "Tauren", @@ -305,6 +315,7 @@ "ungrouptexture", "Uninvite", "Unserializable", + "Unstealthed", "untrackable", "untrigger", "updata", @@ -335,6 +346,7 @@ "Yoyodyne", "yrange", "Ysera", + "Yssaril", "Yu'lon", "Zandalari", "Zarithrian",