MCPcopy Create free account
hub / github.com/OpenMW/openmw / cacheStat

Method cacheStat

apps/openmw/mwlua/localscripts.cpp:35–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33namespace MWLua
34{
35 void SelfObject::cacheStat(LuaManager& manager, SelfObject::CachedStat key, sol::main_object value)
36 {
37 if (mStatsCache.empty())
38 {
39 manager.addAction(
40 [obj = Object(*this)] {
41 LocalScripts* scripts = obj.ptr().getRefData().getLuaScripts();
42 if (scripts)
43 scripts->applyStatsCache();
44 },
45 "StatUpdateAction");
46 }
47 mStatsCache[std::move(key)] = std::move(value);
48 }
49
50 void LocalScripts::initializeSelfPackage(const Context& context)
51 {

Callers 10

setMethod · 0.80
setMethod · 0.80
setCurrentMethod · 0.80
setProgressMethod · 0.80
cacheMethod · 0.80
cacheMethod · 0.80
cacheMethod · 0.80
cacheMethod · 0.80
cacheMethod · 0.80
setMethod · 0.80

Calls 5

addActionMethod · 0.80
getLuaScriptsMethod · 0.80
applyStatsCacheMethod · 0.80
ObjectClass · 0.70
emptyMethod · 0.45

Tested by

no test coverage detected