| 2444 | } |
| 2445 | |
| 2446 | std::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 | |
| 2461 | void ModLoading::RemoveMod(const std::string& path) { |
| 2462 | std::vector<ModInstance*>::iterator modit = GetMod(path); |
no test coverage detected