mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
added paths 'world:' entry point
This commit is contained in:
parent
c6a2fc90a8
commit
5d6c2b9b8e
3 changed files with 12 additions and 0 deletions
|
|
@ -76,6 +76,10 @@ void EnginePaths::setResources(fs::path folder) {
|
|||
this->resources = folder;
|
||||
}
|
||||
|
||||
void EnginePaths::setWorldFolder(fs::path folder) {
|
||||
this->worldFolder = folder;
|
||||
}
|
||||
|
||||
void EnginePaths::setContentPacks(std::vector<ContentPack>* contentPacks) {
|
||||
this->contentPacks = contentPacks;
|
||||
}
|
||||
|
|
@ -96,6 +100,10 @@ fs::path EnginePaths::resolve(std::string path) {
|
|||
return userfiles/fs::path(filename);
|
||||
}
|
||||
|
||||
if (prefix == "world") {
|
||||
return worldFolder/fs::path(filename);
|
||||
}
|
||||
|
||||
if (contentPacks) {
|
||||
for (auto& pack : *contentPacks) {
|
||||
if (pack.id == prefix) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue