mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-26 01:03: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
|
return env
|
||||||
end
|
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{
|
for _, component in ipairs{
|
||||||
"mod",
|
"mod",
|
||||||
|
Loading…
Reference in New Issue
Block a user