Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/game/scripting/StarLuaRoot.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/game/scripting/StarLuaRoot.cpp')
-rw-r--r--source/game/scripting/StarLuaRoot.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/source/game/scripting/StarLuaRoot.cpp b/source/game/scripting/StarLuaRoot.cpp
index a14d10a..592c24b 100644
--- a/source/game/scripting/StarLuaRoot.cpp
+++ b/source/game/scripting/StarLuaRoot.cpp
@@ -106,13 +106,6 @@ LuaContext LuaRoot::createContext(StringList const& scriptPaths) {
}
});
- auto handleIndex = newContext.handleIndex();
- auto engine = m_luaEngine.get();
- newContext.set("loadstring", m_luaEngine->createFunction([engine, handleIndex](String const& source, Maybe<String> const& name, Maybe<LuaTable> const& env) -> LuaFunction {
- String functionName = name ? strf("loadstring: {}", *name) : "loadstring";
- return engine->createFunctionFromSource(env ? env->handleIndex() : handleIndex, source.utf8Ptr(), source.utf8Size(), functionName.utf8Ptr());
- }));
-
auto assets = Root::singleton().assets();
for (auto const& scriptPath : scriptPaths) {