from retail

This commit is contained in:
NoM0Re
2025-01-26 21:24:18 +01:00
parent 1793d7ac19
commit f9bf9c3c16
25 changed files with 1467 additions and 500 deletions
+5 -2
View File
@@ -1,6 +1,6 @@
local AddonName, Private = ...
local internalVersion = 79
local internalVersion = 80
-- Lua APIs
local insert = table.insert
@@ -518,7 +518,7 @@ function Private.RegisterRegionOptions(name, createFunction, icon, displayName,
end
end
function WeakAuras.RegisterSubRegionOptions(name, createFunction, description)
function WeakAuras.RegisterSubRegionOptions(name, createFunction, description, getAnchors)
if not(name) then
error("Improper arguments to WeakAuras.RegisterSubRegionOptions - name is not defined", 2);
elseif(type(name) ~= "string") then
@@ -527,11 +527,14 @@ function WeakAuras.RegisterSubRegionOptions(name, createFunction, description)
error("Improper arguments to WeakAuras.RegisterSubRegionOptions - creation function is not defined", 2);
elseif(type(createFunction) ~= "function") then
error("Improper arguments to WeakAuras.RegisterSubRegionOptions - creation function is not a function", 2);
elseif(getAnchors and type(getAnchors) ~= "function") then
error("Improper arguments to WeakAuras.RegisterSubRegionOptions - getAnchors function is not a function", 2);
elseif(subRegionOptions[name]) then
error("Improper arguments to WeakAuras.RegisterSubRegionOptions - region type \""..name.."\" already defined", 2);
else
subRegionOptions[name] = {
create = createFunction,
getAnchors = getAnchors,
description = description,
};
end