| 2254 | } |
| 2255 | |
| 2256 | bool 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 | |
| 2275 | ModInstance* ModLoading::GetMod(ModID sid) { |
| 2276 | std::vector<ModInstance*>::iterator modit = mods.begin(); |