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

Function ResolveFromRootByMetadata

engine/Poseidon/Core/ModCollection.cpp:138–145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136 return ModId(mod.id) == ModId(token) || (!mod.catalogId.empty() && ModId(mod.catalogId) == ModId(token));
137}
138
139std::string ResolveFromRootByMetadata(const std::filesystem::path& root, const std::string& token)
140{
141 ModLoader loader;
142 loader.AddRoot(root.string(), ModSource::Local);
143 const ModCollection mods = loader.Load();
144 const Mod* mod = mods.Find(token);
145 return mod != nullptr ? mod->path : std::string();
146}
147} // namespace
148

Callers 1

ResolveModPathListFunction · 0.85

Calls 3

AddRootMethod · 0.80
LoadMethod · 0.45
FindMethod · 0.45

Tested by

no test coverage detected