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

Method restart

source/game/scripting/StarLuaRoot.cpp:36–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34}
35
36void LuaRoot::restart() {
37 shutdown();
38
39 auto& root = Root::singleton();
40
41 m_luaEngine = LuaEngine::create(root.configuration()->get("safeScripts").toBool());
42
43 m_luaEngine->setRecursionLimit(root.configuration()->get("scriptRecursionLimit").toUInt());
44 m_luaEngine->setInstructionLimit(root.configuration()->get("scriptInstructionLimit").toUInt());
45 m_luaEngine->setProfilingEnabled(root.configuration()->get("scriptProfilingEnabled").toBool());
46 m_luaEngine->setInstructionMeasureInterval(root.configuration()->get("scriptInstructionMeasureInterval").toUInt());
47}
48
49void LuaRoot::shutdown() {
50 clearScriptCache();

Callers 5

cleanupAndCommitMethod · 0.45
pullRequestsMethod · 0.45
restartLuaMethod · 0.45
runMethod · 0.45

Calls 9

singletonClass · 0.85
toBoolMethod · 0.80
configurationMethod · 0.80
setRecursionLimitMethod · 0.80
toUIntMethod · 0.80
setInstructionLimitMethod · 0.80
setProfilingEnabledMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected