mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 11:01:49 +00:00
fixed worlds list scanning
This commit is contained in:
parent
a4a5aef422
commit
1c99dfa180
5 changed files with 74 additions and 43 deletions
|
|
@ -28,8 +28,6 @@
|
|||
#include <sstream>
|
||||
#include <cstring>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
regfile::regfile(fs::path filename) : file(filename) {
|
||||
if (file.length() < REGION_HEADER_SIZE)
|
||||
throw std::runtime_error("incomplete region file header");
|
||||
|
|
@ -90,6 +88,8 @@ uint WorldRegion::getChunkDataSize(uint x, uint z) {
|
|||
return sizes[z * REGION_SIZE + x];
|
||||
}
|
||||
|
||||
const char* WorldFiles::WORLD_FILE = "world.json";
|
||||
|
||||
WorldFiles::WorldFiles(fs::path directory, const DebugSettings& settings)
|
||||
: directory(directory),
|
||||
generatorTestMode(settings.generatorTestMode),
|
||||
|
|
@ -248,7 +248,7 @@ fs::path WorldFiles::getPlayerFile() const {
|
|||
}
|
||||
|
||||
fs::path WorldFiles::getWorldFile() const {
|
||||
return directory/fs::path("world.json");
|
||||
return directory/fs::path(WORLD_FILE);
|
||||
}
|
||||
|
||||
fs::path WorldFiles::getIndicesFile() const {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue