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

Method WhichCampaignLevelBelongsTo

Source/Internal/modloading.cpp:2446–2459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2444}
2445
2446std::string ModLoading::WhichCampaignLevelBelongsTo(const std::string& level_path) {
2447 for (auto& mod : mods) {
2448 if (mod->IsActive()) {
2449 for (uint32_t j = 0; j < mod->campaigns.size(); j++) {
2450 for (const auto& level : mod->campaigns[j].levels) {
2451 if (std::string("Data/Levels/") + level.path.str() == level_path) {
2452 return mod->campaigns[j].id.str();
2453 }
2454 }
2455 }
2456 }
2457 }
2458 return "";
2459}
2460
2461void ModLoading::RemoveMod(const std::string& path) {
2462 std::vector<ModInstance*>::iterator modit = GetMod(path);

Callers 3

ChangeLevelMethod · 0.80
SetLevelLoadedMethod · 0.80
ExecuteMethod · 0.80

Calls 3

IsActiveMethod · 0.45
sizeMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected