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

Function scriptCfgToString

components/lua/configuration.cpp:286–312  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

284 }
285
286 std::string scriptCfgToString(const ESM::LuaScriptCfg& script)
287 {
288 std::stringstream ss;
289 if (script.mFlags & ESM::LuaScriptCfg::sMerge)
290 ss << "+ ";
291 for (const auto& [flagName, flag] : flagsByName)
292 {
293 if (script.mFlags & flag)
294 ss << flagName << " ";
295 }
296 for (uint32_t type : script.mTypes)
297 {
298 for (const auto& [tagName, t] : typeTagsByName)
299 {
300 if (type == t)
301 ss << tagName << " ";
302 }
303 }
304 ss << ": " << script.mScriptPath;
305 if (!script.mInitializationData.empty())
306 ss << " ; data " << script.mInitializationData.size() << " bytes";
307 if (!script.mRecords.empty())
308 ss << " ; " << script.mRecords.size() << " records";
309 if (!script.mRefs.empty())
310 ss << " ; " << script.mRefs.size() << " objects";
311 return ss.str();
312 }
313
314}

Callers 2

TESTFunction · 0.85
initConfigurationMethod · 0.85

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by 1

TESTFunction · 0.68