Minor refactor

This commit is contained in:
MihailRis
2023-12-20 23:22:48 +03:00
parent e0aee76f41
commit 170e6b86ea
3 changed files with 21 additions and 15 deletions
+9
View File
@@ -78,3 +78,12 @@ fs::path ContentPack::findPack(const EnginePaths* paths, std::string name) {
}
return folder;
}
void ContentPack::readPacks(const EnginePaths* paths,
std::vector<ContentPack>& packs,
const std::vector<std::string>& packnames) {
for (const auto& name : packnames) {
fs::path packfolder = ContentPack::findPack(paths, name);
packs.push_back(ContentPack::read(packfolder));
}
}