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.
This commit is contained in:
+1
-1
@@ -16,7 +16,7 @@ local module = ShaguTweaks:register({
|
||||
-- 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 = _G or getfenv(0)
|
||||
local _G = ShaguTweaks.GetGlobalEnv()
|
||||
|
||||
module.enable = function(self)
|
||||
-- Module code:
|
||||
|
||||
Reference in New Issue
Block a user