std::vector<CArchiveScanner::ArchiveData> CArchiveScanner::GetAllArchives() const { std::vector<ArchiveData> ret; for (const auto& pair: archiveInfos) { const ArchiveData& aid = pair.second.archiveData; // Add the archive the mod is in as the first dependency ArchiveData md = aid; md.GetDependencies().insert(md.GetDependencies().begin(), pair.second.origName); ret.push_back(md); } sortByName(ret); return ret; }
std::vector<CArchiveScanner::ArchiveData> CArchiveScanner::GetAllMods() const { std::vector<ArchiveData> ret; for (std::map<std::string, ArchiveInfo>::const_iterator i = archiveInfo.begin(); i != archiveInfo.end(); ++i) { if (!(i->second.archiveData.GetName().empty()) && ((i->second.archiveData.GetModType() == modtype::primary) || (i->second.archiveData.GetModType() == modtype::hidden))) { // Add the archive the mod is in as the first dependency ArchiveData md = i->second.archiveData; md.GetDependencies().insert(md.GetDependencies().begin(), i->second.origName); ret.push_back(md); } } sortByName(ret); return ret; }
std::vector<CArchiveScanner::ArchiveData> CArchiveScanner::GetAllMods() const { std::vector<ArchiveData> ret; for (auto i = archiveInfos.cbegin(); i != archiveInfos.cend(); ++i) { const ArchiveData& aid = i->second.archiveData; if ((!aid.GetName().empty()) && aid.IsGame()) { // Add the archive the mod is in as the first dependency ArchiveData md = aid; md.GetDependencies().insert(md.GetDependencies().begin(), i->second.origName); ret.push_back(md); } } sortByName(ret); return ret; }