mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
Проверка версий зависимостей
Добавил проверку версий установленных зависимостей паков.
This commit is contained in:
parent
a46aafa562
commit
5994371145
7 changed files with 33 additions and 4 deletions
|
|
@ -132,7 +132,15 @@ ContentPack ContentPack::read(const io::path& folder) {
|
|||
level = DependencyLevel::weak;
|
||||
break;
|
||||
}
|
||||
pack.dependencies.push_back({level, depName});
|
||||
|
||||
std::string depVersion = "*";
|
||||
size_t version_pos = depName.rfind("@");
|
||||
if (version_pos != std::string::npos){
|
||||
depVersion = depName.substr(version_pos + 1);
|
||||
depName = depName.substr(0, version_pos);
|
||||
}
|
||||
|
||||
pack.dependencies.push_back({level, depName, depVersion});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue