mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 06:51:51 +00:00
feat: 'res:project' as default project
This commit is contained in:
parent
ca066f46a6
commit
57fa6393c2
4 changed files with 8 additions and 1 deletions
|
|
@ -86,3 +86,4 @@ inline const std::string SOUNDS_FOLDER = "sounds";
|
||||||
inline const std::string TEXTURES_FOLDER = "textures";
|
inline const std::string TEXTURES_FOLDER = "textures";
|
||||||
|
|
||||||
inline const std::string FONT_DEFAULT = "normal";
|
inline const std::string FONT_DEFAULT = "normal";
|
||||||
|
inline const std::string DEFAULT_PROJECT_PATH = "project";
|
||||||
|
|
|
||||||
|
|
@ -132,8 +132,14 @@ void Engine::initialize(CoreParameters coreParameters) {
|
||||||
logger.info() << "engine runs in headless mode";
|
logger.info() << "engine runs in headless mode";
|
||||||
}
|
}
|
||||||
if (params.projectFolder.empty()) {
|
if (params.projectFolder.empty()) {
|
||||||
|
auto mainProjectPath =
|
||||||
|
params.resFolder / std::filesystem::u8path(DEFAULT_PROJECT_PATH);
|
||||||
|
if (std::filesystem::is_directory(mainProjectPath)) {
|
||||||
|
params.projectFolder = mainProjectPath;
|
||||||
|
} else {
|
||||||
params.projectFolder = params.resFolder;
|
params.projectFolder = params.resFolder;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
paths = std::make_unique<EnginePaths>(params);
|
paths = std::make_unique<EnginePaths>(params);
|
||||||
loadProject();
|
loadProject();
|
||||||
paths->setupProject(*project);
|
paths->setupProject(*project);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue