From 6a2ee814158b5e343a8b1f63a26b4de40e29ae2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 20 Nov 2019 21:44:35 +0800 Subject: =?UTF-8?q?=E6=94=AF=E6=8C=81=20library?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-beta/src/vm/dummySource.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 server-beta/src/vm/dummySource.lua (limited to 'server-beta/src/vm/dummySource.lua') diff --git a/server-beta/src/vm/dummySource.lua b/server-beta/src/vm/dummySource.lua new file mode 100644 index 00000000..50ff13e7 --- /dev/null +++ b/server-beta/src/vm/dummySource.lua @@ -0,0 +1,13 @@ +local vm = require 'vm.vm' + +vm.librarySourceCache = setmetatable({}, { __mode = 'kv'}) + +function vm.librarySource(lib) + if not vm.librarySourceCache[lib] then + vm.librarySourceCache[lib] = { + type = 'library', + library = lib, + } + end + return vm.librarySourceCache[lib] +end -- cgit v1.2.3