summaryrefslogtreecommitdiff
path: root/server-beta
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta')
-rw-r--r--server-beta/src/core/local.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/server-beta/src/core/local.lua b/server-beta/src/core/local.lua
index 79b16770..1a9c1644 100644
--- a/server-beta/src/core/local.lua
+++ b/server-beta/src/core/local.lua
@@ -58,6 +58,19 @@ function m:field(source, key, callback)
elseif ref.type == 'getglobal' then
-- _ENV.XXX
callback(ref, 'get')
+ if self:getSpecial(ref) == 's|_G' then
+ local parent = ref.parent
+ local tp = parent.type
+ if tp == 'setfield'
+ or tp == 'setmethod'
+ or tp == 'setindex' then
+ callback(parent, 'set')
+ elseif tp == 'getfield'
+ or tp == 'getmethod'
+ or tp == 'getindex' then
+ callback(parent, 'get')
+ end
+ end
elseif ref.type == 'setglobal' then
-- _ENV.XXX = XXX
callback(ref, 'set')