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

summaryrefslogtreecommitdiff
path: root/source/game/scripting/StarLuaRoot.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-11-30 09:17:44 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-11-30 09:17:44 +1100
commitcbde26aebeec3a3cb72cfd6b55c7867d27b8c789 (patch)
treea25dc6c01637d1ce2049280f1cb67c69f584955d /source/game/scripting/StarLuaRoot.cpp
parente437282d5cf33b01b967151a56c70d8d1603f375 (diff)
move loadstring out of LuaRoot
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) {