Skip to content

Commit

Permalink
Few more spelling and type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Stanzilla committed May 7, 2024
1 parent b24b643 commit a24e76c
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 20 deletions.
4 changes: 3 additions & 1 deletion .luarc.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@
"CreateScrollBoxListLinearView",
"CreateDataProvider",
"UIMenuButtonStretchMixin",
"ToggleDropDownMenu"
"ToggleDropDownMenu",
"GetPrimaryTalentTree",
"GetTalentTabInfo"
],
"runtime.version": "Lua 5.1",
"workspace.ignoreDir": [
Expand Down
4 changes: 2 additions & 2 deletions WeakAuras/BuffTrigger2.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions WeakAuras/GenericTrigger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions WeakAuras/Init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion WeakAuras/Prototypes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
Expand Down
2 changes: 1 addition & 1 deletion WeakAuras/SubRegionTypes/Glow.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions WeakAuras/WeakAuras.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -5304,6 +5304,7 @@ local function ensureMouseFrame()
if (mouseFrame) then
return;
end
---@class Frame
mouseFrame = CreateFrame("Frame", "WeakAurasAttachToMouseFrame", UIParent);
mouseFrame.attachedVisibleFrames = {};
mouseFrame:SetWidth(1);
Expand Down Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -1806,6 +1807,7 @@ local function Constructor()

button.description = {};

---@class Button
local view = CreateFrame("Button", nil, button);
button.view = view;
view:SetWidth(16);
Expand Down Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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)
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions WeakAurasOptions/RegionOptions/Icon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
4 changes: 3 additions & 1 deletion WeakAurasOptions/RegionOptions/Model.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions WeakAurasOptions/WeakAurasOptions.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
18 changes: 15 additions & 3 deletions cspell.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -108,6 +112,7 @@
"Frostwyrm",
"ftcsv",
"funcs",
"Funkeh",
"Gahz'ranka",
"Galmok",
"Garr",
Expand Down Expand Up @@ -261,7 +266,11 @@
"scaley",
"Scorpid",
"scrollbg",
"sealofsalvation",
"setfenv",
"sfgg",
"sfng",
"sfsg",
"Shahraz",
"Shazzrah",
"Shoop",
Expand All @@ -273,6 +282,7 @@
"SOUNDFX",
"spammy",
"spellid",
"Stealthed",
"Sulfuron",
"Taijitu",
"Tauren",
Expand Down Expand Up @@ -305,6 +315,7 @@
"ungrouptexture",
"Uninvite",
"Unserializable",
"Unstealthed",
"untrackable",
"untrigger",
"updata",
Expand Down Expand Up @@ -335,6 +346,7 @@
"Yoyodyne",
"yrange",
"Ysera",
"Yssaril",
"Yu'lon",
"Zandalari",
"Zarithrian",
Expand Down

0 comments on commit a24e76c

Please sign in to comment.