replace structures.json with structures.toml
This commit is contained in:
parent
5ff42929f9
commit
f87bb960a9
@ -1,7 +0,0 @@
|
||||
{
|
||||
"tree0": {},
|
||||
"tree1": {},
|
||||
"tree2": {},
|
||||
"tower": {},
|
||||
"coal_ore0": {}
|
||||
}
|
||||
5
res/content/base/generators/demo.files/structures.toml
Normal file
5
res/content/base/generators/demo.files/structures.toml
Normal file
@ -0,0 +1,5 @@
|
||||
tree0 = {}
|
||||
tree1 = {}
|
||||
tree2 = {}
|
||||
tower = {}
|
||||
coal_ore0 = {}
|
||||
@ -133,7 +133,7 @@ static std::vector<std::unique_ptr<VoxelStructure>> load_structures(
|
||||
const fs::path& structuresFile
|
||||
) {
|
||||
auto structuresDir = structuresFile.parent_path() / fs::path("fragments");
|
||||
auto map = files::read_json(structuresFile);
|
||||
auto map = files::read_object(structuresFile);
|
||||
|
||||
std::vector<std::unique_ptr<VoxelStructure>> structures;
|
||||
for (auto& [name, config] : map.asObject()) {
|
||||
@ -171,7 +171,7 @@ static void load_structures(GeneratorDef& def, const fs::path& structuresFile) {
|
||||
}
|
||||
}
|
||||
|
||||
static inline const auto STRUCTURES_FILE = fs::u8path("structures.json");
|
||||
static inline const auto STRUCTURES_FILE = fs::u8path("structures.toml");
|
||||
static inline const auto BIOMES_FILE = fs::u8path("biomes.toml");
|
||||
static inline const auto GENERATORS_DIR = fs::u8path("generators");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user