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

Method CampaignHasLevel

Source/Internal/modloading.cpp:2256–2273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2254}
2255
2256bool ModLoading::CampaignHasLevel(const std::string& campaign, const std::string& level_path) {
2257 for (auto& mod : mods) {
2258 if (mod->IsActive()) {
2259 for (uint32_t j = 0; j < mod->campaigns.size(); j++) {
2260 if (strmtch(mod->campaigns[j].id, campaign)) {
2261 for (const auto& level : mod->campaigns[j].levels) {
2262 LOGI << "path: " << std::string("Data/Levels/") + level.path.str() << std::endl;
2263 LOGI << "Level path: " << level_path << std::endl;
2264 if (level.path.str() == level_path) {
2265 return true;
2266 }
2267 }
2268 }
2269 }
2270 }
2271 }
2272 return false;
2273}
2274
2275ModInstance* ModLoading::GetMod(ModID sid) {
2276 std::vector<ModInstance*>::iterator modit = mods.begin();

Callers

nothing calls this directly

Calls 4

strmtchFunction · 0.85
IsActiveMethod · 0.45
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected