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

Method loadContextScript

source/game/scripting/StarLuaRoot.cpp:180–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void LuaRoot::ScriptCache::loadContextScript(LuaContext& context, String const& assetPath) {
181 RecursiveMutexLocker locker(mutex);
182 if (!scriptLoaded(assetPath))
183 loadScript(context.engine(), assetPath);
184 context.load(scripts.get(assetPath));
185}
186
187size_t LuaRoot::ScriptCache::memoryUsage() const {
188 RecursiveMutexLocker locker(mutex);

Callers 1

createContextMethod · 0.80

Calls 2

loadMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected