mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
add 'script' entry point
This commit is contained in:
parent
1aca4957a4
commit
dc93cac1b9
3 changed files with 14 additions and 1 deletions
|
|
@ -169,6 +169,10 @@ void EnginePaths::setResourcesFolder(std::filesystem::path folder) {
|
|||
this->resourcesFolder = std::move(folder);
|
||||
}
|
||||
|
||||
void EnginePaths::setScriptFolder(std::filesystem::path folder) {
|
||||
this->scriptFolder = std::move(folder);
|
||||
}
|
||||
|
||||
void EnginePaths::setCurrentWorldFolder(std::filesystem::path folder) {
|
||||
this->currentWorldFolder = std::move(folder);
|
||||
}
|
||||
|
|
@ -211,7 +215,9 @@ std::filesystem::path EnginePaths::resolve(
|
|||
if (prefix == "export") {
|
||||
return userFilesFolder / EXPORT_FOLDER / fs::u8path(filename);
|
||||
}
|
||||
|
||||
if (prefix == "script" && scriptFolder) {
|
||||
return scriptFolder.value() / fs::u8path(filename);
|
||||
}
|
||||
if (contentPacks) {
|
||||
for (auto& pack : *contentPacks) {
|
||||
if (pack.id == prefix) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue