summaryrefslogtreecommitdiff
path: root/server-beta/src/vm/dummySource.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/src/vm/dummySource.lua')
-rw-r--r--server-beta/src/vm/dummySource.lua13
1 files changed, 13 insertions, 0 deletions
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