mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
add automatic biome-based structures placement
This commit is contained in:
parent
323c2f2935
commit
806ed4b155
8 changed files with 174 additions and 106 deletions
|
|
@ -45,7 +45,12 @@ static std::vector<std::unique_ptr<GeneratingVoxelStructure>> load_structures(
|
|||
}
|
||||
|
||||
static void load_structures(GeneratorDef& def, const fs::path& structuresFile) {
|
||||
def.structures = load_structures(structuresFile);
|
||||
auto rawStructures = load_structures(structuresFile);
|
||||
def.structures.resize(rawStructures.size());
|
||||
|
||||
for (int i = 0; i < rawStructures.size(); i++) {
|
||||
def.structures[i] = std::move(rawStructures[i]);
|
||||
}
|
||||
// build indices map
|
||||
for (size_t i = 0; i < def.structures.size(); i++) {
|
||||
auto& structure = def.structures[i];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue