fix structures choosing
This commit is contained in:
parent
09e9c570c0
commit
dbaea71398
@ -7,7 +7,7 @@ biome_parameters = 2
|
|||||||
biomes = {
|
biomes = {
|
||||||
plains = {
|
plains = {
|
||||||
parameters = {
|
parameters = {
|
||||||
{value=0.5, weight=1.0},
|
{value=0.5, weight=0.3},
|
||||||
{value=0.5, weight=0.3},
|
{value=0.5, weight=0.3},
|
||||||
},
|
},
|
||||||
sea_layers = {
|
sea_layers = {
|
||||||
@ -27,8 +27,8 @@ biomes = {
|
|||||||
},
|
},
|
||||||
desert = {
|
desert = {
|
||||||
parameters = {
|
parameters = {
|
||||||
{value=0.0, weight=0.36},
|
{value=0.0, weight=0.1},
|
||||||
{value=0.0, weight=0.4},
|
{value=0.0, weight=0.1},
|
||||||
},
|
},
|
||||||
sea_layers = {
|
sea_layers = {
|
||||||
{block="base:water", height=-1},
|
{block="base:water", height=-1},
|
||||||
@ -120,9 +120,9 @@ local function _generate_biome_parameters(x, y, w, h, seed, s)
|
|||||||
tempmap:noise({x, y}, 0.04*s, 5)
|
tempmap:noise({x, y}, 0.04*s, 5)
|
||||||
local hummap = Heightmap(w, h)
|
local hummap = Heightmap(w, h)
|
||||||
hummap.noiseSeed = seed + 953
|
hummap.noiseSeed = seed + 953
|
||||||
hummap:noise({x, y}, 0.016*s, 5)
|
hummap:noise({x, y}, 0.04*s, 5)
|
||||||
tempmap:pow(2)
|
tempmap:pow(3)
|
||||||
hummap:pow(2)
|
hummap:pow(3)
|
||||||
return tempmap, hummap
|
return tempmap, hummap
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -520,7 +520,6 @@ void ContentLoader::load() {
|
|||||||
create_unit_id(pack->id, file.stem().u8string());
|
create_unit_id(pack->id, file.stem().u8string());
|
||||||
|
|
||||||
auto& def = builder.generators.create(full);
|
auto& def = builder.generators.create(full);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
loadGenerator(def, full, name);
|
loadGenerator(def, full, name);
|
||||||
} catch (const std::runtime_error& err) {
|
} catch (const std::runtime_error& err) {
|
||||||
|
|||||||
@ -70,7 +70,7 @@ struct BiomeElementList {
|
|||||||
/// @brief Entries sorted by weight descending.
|
/// @brief Entries sorted by weight descending.
|
||||||
std::vector<WeightedEntry> entries;
|
std::vector<WeightedEntry> entries;
|
||||||
/// @brief Sum of weight values
|
/// @brief Sum of weight values
|
||||||
float weightsSum;
|
float weightsSum = 0.0f;
|
||||||
/// @brief Value generation chance
|
/// @brief Value generation chance
|
||||||
float chance;
|
float chance;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user