mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 14:01:49 +00:00
Merge branch 'main' into extended-blocks
This commit is contained in:
commit
c54dbad8a0
3 changed files with 11 additions and 0 deletions
|
|
@ -66,6 +66,7 @@ Engine::Engine(EngineSettings& settings, SettingsHandler& settingsHandler, Engin
|
||||||
: settings(settings), settingsHandler(settingsHandler), paths(paths),
|
: settings(settings), settingsHandler(settingsHandler), paths(paths),
|
||||||
interpreter(std::make_unique<cmd::CommandsInterpreter>())
|
interpreter(std::make_unique<cmd::CommandsInterpreter>())
|
||||||
{
|
{
|
||||||
|
paths->prepare();
|
||||||
loadSettings();
|
loadSettings();
|
||||||
|
|
||||||
controller = std::make_unique<EngineController>(this);
|
controller = std::make_unique<EngineController>(this);
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,17 @@
|
||||||
#include "WorldFiles.hpp"
|
#include "WorldFiles.hpp"
|
||||||
|
|
||||||
const fs::path SCREENSHOTS_FOLDER {"screenshots"};
|
const fs::path SCREENSHOTS_FOLDER {"screenshots"};
|
||||||
|
const fs::path CONTENT_FOLDER {"content"};
|
||||||
const fs::path CONTROLS_FILE {"controls.toml"};
|
const fs::path CONTROLS_FILE {"controls.toml"};
|
||||||
const fs::path SETTINGS_FILE {"settings.toml"};
|
const fs::path SETTINGS_FILE {"settings.toml"};
|
||||||
|
|
||||||
|
void EnginePaths::prepare() {
|
||||||
|
fs::path contentFolder = userfiles/fs::path(CONTENT_FOLDER);
|
||||||
|
if (!fs::is_directory(contentFolder)) {
|
||||||
|
fs::create_directories(contentFolder);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fs::path EnginePaths::getUserfiles() const {
|
fs::path EnginePaths::getUserfiles() const {
|
||||||
return userfiles;
|
return userfiles;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,8 @@ class EnginePaths {
|
||||||
fs::path worldFolder;
|
fs::path worldFolder;
|
||||||
std::vector<ContentPack>* contentPacks = nullptr;
|
std::vector<ContentPack>* contentPacks = nullptr;
|
||||||
public:
|
public:
|
||||||
|
void prepare();
|
||||||
|
|
||||||
fs::path getUserfiles() const;
|
fs::path getUserfiles() const;
|
||||||
fs::path getResources() const;
|
fs::path getResources() const;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue