MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / startLuaScripts

Method startLuaScripts

source/game/StarUniverseClient.cpp:548–558  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

546}
547
548void UniverseClient::startLuaScripts() {
549 auto assets = Root::singleton().assets();
550 for (auto& p : assets->json("/client.config:universeScriptContexts").toObject()) {
551 auto scriptComponent = make_shared<ScriptComponent>();
552 scriptComponent->setLuaRoot(m_luaRoot);
553 scriptComponent->setScripts(jsonToStringList(p.second.toArray()));
554
555 m_scriptContexts.set(p.first, scriptComponent);
556 scriptComponent->init();
557 }
558}
559
560void UniverseClient::stopLua() {
561 for (auto& p : m_scriptContexts)

Callers 1

changeStateMethod · 0.45

Calls 10

singletonClass · 0.85
jsonToStringListFunction · 0.85
assetsMethod · 0.80
toObjectMethod · 0.80
jsonMethod · 0.80
setLuaRootMethod · 0.80
setScriptsMethod · 0.80
toArrayMethod · 0.80
setMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected