Skip to content

Commit

Permalink
add more mixins to exec_env
Browse files Browse the repository at this point in the history
  • Loading branch information
emptyrivers authored and InfusOnWoW committed Jul 11, 2024
1 parent 56ed6a3 commit 8949575
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,13 @@ globals = {
"TableHasAnyEntries",
"tIndexOf",
"UISpecialFrames",
"Vector2DMixin",
"Vector3DMixin",
"ItemLocationMixin",
"ItemTransmogInfoMixin",
"TransmogPendingInfoMixin",
"TransmogLocationMixin",
"PlayerLocationMixin",


-- FrameXML frames
Expand Down
13 changes: 11 additions & 2 deletions WeakAuras/AuraEnvironment.lua
Original file line number Diff line number Diff line change
Expand Up @@ -524,8 +524,17 @@ local overridden = {
}

local env_getglobal_custom
-- WORKAROUND ColorMixin not being found in our environemnt #5071
local exec_env_custom = setmetatable({ColorMixin = ColorMixin},
-- WORKAROUND API which return Mixin'd values need those mixin "rawgettable" in caller's fenv #5071
local exec_env_custom = setmetatable({
ColorMixin = ColorMixin,
Vector2DMixin = Vector2DMixin,
Vector3DMixin = Vector3DMixin,
ItemLocationMixin = ItemLocationMixin,
ItemTransmogInfoMixin = ItemTransmogInfoMixin,
TransmogPendingInfoMixin = TransmogPendingInfoMixin,
TransmogLocationMixin = TransmogLocationMixin,
PlayerLocationMixin = PlayerLocationMixin,
},
{
__index = function(t, k)
if k == "_G" then
Expand Down

0 comments on commit 8949575

Please sign in to comment.