diff options
-rw-r--r-- | .vscode/launch.json | 2 | ||||
-rw-r--r-- | script-beta/core/definition.lua | 3 | ||||
-rw-r--r-- | script-beta/vm/getGlobals.lua | 6 |
3 files changed, 9 insertions, 2 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json index 838f6b24..438fe0d7 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -48,7 +48,7 @@ "type": "lua", "request": "attach", "stopOnEntry": true, - "address": "127.0.0.1:11413", + "address": "127.0.0.1:11419", "outputCapture": [ ] }, diff --git a/script-beta/core/definition.lua b/script-beta/core/definition.lua index 8c308aaf..f2177fc9 100644 --- a/script-beta/core/definition.lua +++ b/script-beta/core/definition.lua @@ -80,6 +80,9 @@ local function convertIndex(source) or source.type == 'boolean' or source.type == 'number' then local parent = source.parent + if not parent then + return + end if parent.type == 'setindex' or parent.type == 'getindex' or parent.type == 'tableindex' then diff --git a/script-beta/vm/getGlobals.lua b/script-beta/vm/getGlobals.lua index 661037be..d7470d47 100644 --- a/script-beta/vm/getGlobals.lua +++ b/script-beta/vm/getGlobals.lua @@ -3,6 +3,7 @@ local vm = require 'vm.vm' local files = require 'files' local library = require 'library' local util = require 'utility' +local config = require 'config' local function searchRawset(ref, results) if guide.getKeyName(ref) ~= 's|rawset' then @@ -78,7 +79,10 @@ end local function insertLibrary(results, name) if name:sub(1, 2) == 's|' then - results[#results+1] = library.global[name:sub(3)] + local libname = name:sub(3) + results[#results+1] = library.global[libname] + local asName = config.config.runtime.special[libname] + results[#results+1] = library.global[asName] end end |