MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / GetModName

Method GetModName

Source/Internal/modloading.cpp:2286–2300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2284}
2285
2286std::string ModLoading::GetModName(ModID sid) {
2287 std::vector<ModInstance*>::iterator modit = mods.begin();
2288
2289 if (sid == CoreGameModID) {
2290 return "Core Engine";
2291 }
2292
2293 for (; modit != mods.end(); modit++) {
2294 if ((*modit)->GetSid() == sid) {
2295 return (*modit)->name.str();
2296 }
2297 }
2298
2299 return "Unknown";
2300}
2301
2302std::string ModLoading::GetModID(ModID sid) {
2303 if (sid == CoreGameModID) {

Callers 2

CompileScriptMethod · 0.80

Calls 4

GetSidMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected