From 309e3c343a605b99cac0c91a05ba704c277aafc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 31 Aug 2020 18:58:01 +0800 Subject: =?UTF-8?q?=E6=9A=82=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/vm/guideInterface.lua | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/script-beta/vm/guideInterface.lua b/script-beta/vm/guideInterface.lua index b21aee79..d223f2e6 100644 --- a/script-beta/vm/guideInterface.lua +++ b/script-beta/vm/guideInterface.lua @@ -36,6 +36,10 @@ function m.require(args, index) end end end + + local lib = library.library[reqName] + results[#results+1] = lib + return results end @@ -87,12 +91,17 @@ function vm.interface.link(uri) end function vm.interface.index(obj) + if obj.library then + return obj.fields + end + local tp = obj.type local lib = library.object[tp] - if not lib then - return nil + if lib then + return lib.fields end - return lib.fields + + return nil end function vm.interface.cache(source, mode) -- cgit v1.2.3