diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-11-30 09:17:44 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-11-30 09:17:44 +1100 |
commit | cbde26aebeec3a3cb72cfd6b55c7867d27b8c789 (patch) | |
tree | a25dc6c01637d1ce2049280f1cb67c69f584955d /source/game/scripting/StarLuaRoot.cpp | |
parent | e437282d5cf33b01b967151a56c70d8d1603f375 (diff) |
move loadstring out of LuaRoot
Diffstat (limited to 'source/game/scripting/StarLuaRoot.cpp')
-rw-r--r-- | source/game/scripting/StarLuaRoot.cpp | 7 |
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) { |