diff options
Diffstat (limited to 'server/src/vm')
-rw-r--r-- | server/src/vm/global.lua | 7 | ||||
-rw-r--r-- | server/src/vm/value.lua | 4 |
2 files changed, 10 insertions, 1 deletions
diff --git a/server/src/vm/global.lua b/server/src/vm/global.lua index bb506ce9..b1b32505 100644 --- a/server/src/vm/global.lua +++ b/server/src/vm/global.lua @@ -13,9 +13,14 @@ return function (lsp) global:rawSet(name, value) end end + + local _G = global:getChild '_G' + global:eachChild(function (k, v) + _G:setChild(k, v) + end) end if lsp then lsp.globalValue = global end - return global + return global:rawGet('_G') end diff --git a/server/src/vm/value.lua b/server/src/vm/value.lua index 44e9d1e4..60f0c663 100644 --- a/server/src/vm/value.lua +++ b/server/src/vm/value.lua @@ -151,6 +151,10 @@ function mt:getChild(index, source, mark) return method:getChild(index, source, mark) end +function mt:bindChild(other) + self._child = other._child +end + function mt:setMetaTable(metatable) self._meta = metatable end |