mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
Minor refactor
This commit is contained in:
parent
e0aee76f41
commit
170e6b86ea
3 changed files with 21 additions and 15 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ struct ContentPack {
|
|||
std::vector<ContentPack>& packs);
|
||||
static std::vector<std::string> worldPacksList(std::filesystem::path folder);
|
||||
static std::filesystem::path findPack(const EnginePaths* paths, std::string name);
|
||||
static void readPacks(const EnginePaths* paths,
|
||||
std::vector<ContentPack>& packs,
|
||||
const std::vector<std::string>& names);
|
||||
};
|
||||
|
||||
#endif // CONTENT_CONTENT_PACK_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue