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

Method GetModInstance

Source/Internal/modloading.cpp:2361–2372  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2359}
2360
2361ModInstance* ModLoading::GetModInstance(const std::string& campaign_id) {
2362 for (auto& mod : mods) {
2363 if (mod->IsActive()) {
2364 for (uint32_t j = 0; j < mod->campaigns.size(); j++) {
2365 if (strmtch(mod->campaigns[j].id, campaign_id)) {
2366 return mod;
2367 }
2368 }
2369 }
2370 }
2371 return nullptr;
2372}
2373
2374std::vector<ModInstance::Campaign> ModLoading::GetCampaigns() {
2375 std::vector<ModInstance::Campaign> campaigns;

Callers 1

ReloadMethod · 0.45

Calls 3

strmtchFunction · 0.85
IsActiveMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected