mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add file.name(), file.stem() & add 'path' to pack info & add start_coroutine()
This commit is contained in:
parent
c51a7e0153
commit
136c35591c
14 changed files with 147 additions and 70 deletions
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PacksManager::PacksManager() = default;
|
||||
|
||||
void PacksManager::setSources(std::vector<fs::path> sources) {
|
||||
void PacksManager::setSources(std::vector<std::pair<std::string, fs::path>> sources) {
|
||||
this->sources = std::move(sources);
|
||||
}
|
||||
|
||||
|
|
@ -15,8 +15,8 @@ void PacksManager::scan() {
|
|||
packs.clear();
|
||||
|
||||
std::vector<ContentPack> packsList;
|
||||
for (auto& folder : sources) {
|
||||
ContentPack::scanFolder(folder, packsList);
|
||||
for (auto& [path, folder] : sources) {
|
||||
ContentPack::scanFolder(path, folder, packsList);
|
||||
for (auto& pack : packsList) {
|
||||
packs.try_emplace(pack.id, pack);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue