mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-25 16:53:46 +01:00
Add modlib._RG for raw global access
This commit is contained in:
parent
b09ba18421
commit
1e10ab0270
9
init.lua
9
init.lua
@ -52,7 +52,14 @@ local function loadfile_exports(filename)
|
||||
return env
|
||||
end
|
||||
|
||||
modlib = {}
|
||||
modlib = {_RG = setmetatable({}, {
|
||||
__index = function(_, index)
|
||||
return rawget(_G, index)
|
||||
end,
|
||||
__newindex = function(_, index, value)
|
||||
return rawset(_G, index, value)
|
||||
end
|
||||
})}
|
||||
|
||||
for _, component in ipairs{
|
||||
"mod",
|
||||
|
Loading…
Reference in New Issue
Block a user