MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / SetModPath

Method SetModPath

engine/Poseidon/Core/ModSystem.cpp:18–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16ModCollection ModSystem::s_active;
17
18void ModSystem::SetModPath(const RStringB& modPath)
19{
20 s_active = ActiveModsFromMountPath((const char*)modPath);
21 // Keep the addon-bank loader's mod path in sync with the (normalized) mount paths.
22 const std::string mountPath = s_active.FormatMountPath();
23 ::GetModPathInternal() = mountPath.c_str();
24
25 if (!mountPath.empty())
26 {
27 LOG_INFO(Core, "Mod path set: {}", mountPath.c_str());
28 for (const Mod& mod : s_active.All())
29 {
30 LOG_INFO(Core, "Loaded mod: '{}' from '{}'", mod.id.c_str(), mod.path.c_str());
31 }
32 }
33 else
34 {
35 LOG_DEBUG(Core, "Mod path cleared (using base game files only)");
36 }
37}
38
39RStringB ModSystem::GetModList()
40{

Callers

nothing calls this directly

Calls 3

ActiveModsFromMountPathFunction · 0.85
FormatMountPathMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected