Files
ShagaTweaks/mods/custom.lua
T
shagu 6c26bc6190 core: don't rely on sane global environment
some addons like to provide a broken _G variable to
the global environment breaking every other addon that
relies on it if existing. With this commit, make ShaguTweaks
no longer re-use the global _G, even if existing.
2022-11-19 16:59:12 +01:00

33 lines
990 B
Lua

-- This module can be used to add your own custom code.
-- Make sure to read the comments carefully.
-- Remove the following line to activate the module:
if true then return end
-- This table holds the meta-data of the module:
local module = ShaguTweaks:register({
title = "Custom Settings",
description = "Custom code: Have a look at mods/custom.lua",
expansions = { ["vanilla"] = true, ["tbc"] = true },
category = nil,
enabled = nil,
})
-- Global code:
-- This is where you can put your most basic variable assignments.
-- Code in this scope will *always* run, no matter if the module is enabled or not.
local _G = ShaguTweaks.GetGlobalEnv()
module.enable = function(self)
-- Module code:
-- This is where you should put your changes.
-- Code in this scope will *only* if the module is enabled.
-- Example:
-- Hide actionbar textures:
-- for i = 0, 4 do
-- _G["MainMenuMaxLevelBar"..i]:Hide()
-- _G["MainMenuBarTexture"..i]:Hide()
-- end
end