mirror of
https://github.com/minetest/minetest.git
synced 2024-11-23 16:13:46 +01:00
Mapgen: Add global 'decorations' flag
Flag is set by default in MapgenParams The global 'trees' flag remains but is now undocumented and unset by default in MapgenParams Add mgv6_spflag 'trees' set by default in defaultsettings.cpp to affect new worlds only This is automatically backwards compatible for existing worlds
This commit is contained in:
parent
4fd394b657
commit
d7bbe81726
@ -829,10 +829,11 @@ max_block_generate_distance (Max block generate distance) int 6
|
|||||||
map_generation_limit (Map generation limit) int 31000 0 31000
|
map_generation_limit (Map generation limit) int 31000 0 31000
|
||||||
|
|
||||||
# Global map generation attributes.
|
# Global map generation attributes.
|
||||||
# The 'trees' flag only has effect in mgv6.
|
# In Mapgen v6 the 'decorations' flag controls all decorations except trees
|
||||||
|
# and junglegrass, in all other mapgens this flag controls all decorations.
|
||||||
# Flags that are not specified in the flag string are not modified from the default.
|
# Flags that are not specified in the flag string are not modified from the default.
|
||||||
# Flags starting with "no" are used to explicitly disable them.
|
# Flags starting with "no" are used to explicitly disable them.
|
||||||
mg_flags (Mapgen flags) flags trees,caves,dungeons,light trees,caves,dungeons,light,notrees,nocaves,nodungeons,nolight
|
mg_flags (Mapgen flags) flags caves,dungeons,light,decorations caves,dungeons,light,decorations,nocaves,nodungeons,nolight,nodecorations
|
||||||
|
|
||||||
[**Advanced]
|
[**Advanced]
|
||||||
|
|
||||||
@ -889,7 +890,7 @@ mgv5_np_cave2 (Mapgen v5 cave2 noise parameters) noise_params 0, 12, (50, 50, 50
|
|||||||
# When snowbiomes are enabled jungles are enabled and the jungles flag is ignored.
|
# When snowbiomes are enabled jungles are enabled and the jungles flag is ignored.
|
||||||
# Flags that are not specified in the flag string are not modified from the default.
|
# Flags that are not specified in the flag string are not modified from the default.
|
||||||
# Flags starting with "no" are used to explicitly disable them.
|
# Flags starting with "no" are used to explicitly disable them.
|
||||||
mgv6_spflags (Mapgen v6 flags) flags jungles,biomeblend,mudflow,snowbiomes jungles,biomeblend,mudflow,snowbiomes,flat,nojungles,nobiomeblend,nomudflow,nosnowbiomes,noflat
|
mgv6_spflags (Mapgen v6 flags) flags jungles,biomeblend,mudflow,snowbiomes,trees jungles,biomeblend,mudflow,snowbiomes,flat,trees,nojungles,nobiomeblend,nomudflow,nosnowbiomes,noflat,notrees
|
||||||
|
|
||||||
# Controls size of deserts and beaches in Mapgen v6.
|
# Controls size of deserts and beaches in Mapgen v6.
|
||||||
# When snowbiomes are enabled 'mgv6_freq_desert' is ignored.
|
# When snowbiomes are enabled 'mgv6_freq_desert' is ignored.
|
||||||
|
@ -1021,11 +1021,12 @@
|
|||||||
# map_generation_limit = 31000
|
# map_generation_limit = 31000
|
||||||
|
|
||||||
# Global map generation attributes.
|
# Global map generation attributes.
|
||||||
# The 'trees' flag only has effect in mgv6.
|
# In Mapgen v6 the 'decorations' flag controls all decorations except trees
|
||||||
|
# and junglegrass, in all other mapgens this flag controls all decorations.
|
||||||
# Flags that are not specified in the flag string are not modified from the default.
|
# Flags that are not specified in the flag string are not modified from the default.
|
||||||
# Flags starting with "no" are used to explicitly disable them.
|
# Flags starting with "no" are used to explicitly disable them.
|
||||||
# type: flags possible values: trees, caves, dungeons, light, notrees, nocaves, nodungeons, nolight
|
# type: flags possible values: caves, dungeons, light, decorations, nocaves, nodungeons, nolight, nodecorations
|
||||||
# mg_flags = trees,caves,dungeons,light
|
# mg_flags = caves,dungeons,light,decorations
|
||||||
|
|
||||||
### Advanced
|
### Advanced
|
||||||
|
|
||||||
@ -1093,8 +1094,8 @@
|
|||||||
# When snowbiomes are enabled jungles are enabled and the jungles flag is ignored.
|
# When snowbiomes are enabled jungles are enabled and the jungles flag is ignored.
|
||||||
# Flags that are not specified in the flag string are not modified from the default.
|
# Flags that are not specified in the flag string are not modified from the default.
|
||||||
# Flags starting with "no" are used to explicitly disable them.
|
# Flags starting with "no" are used to explicitly disable them.
|
||||||
# type: flags possible values: jungles, biomeblend, mudflow, snowbiomes, flat, nojungles, nobiomeblend, nomudflow, nosnowbiomes, noflat
|
# type: flags possible values: jungles, biomeblend, mudflow, snowbiomes, flat, trees, nojungles, nobiomeblend, nomudflow, nosnowbiomes, noflat, notrees
|
||||||
# mgv6_spflags = jungles,biomeblend,mudflow,snowbiomes
|
# mgv6_spflags = jungles,biomeblend,mudflow,snowbiomes,trees
|
||||||
|
|
||||||
# Controls size of deserts and beaches in Mapgen v6.
|
# Controls size of deserts and beaches in Mapgen v6.
|
||||||
# When snowbiomes are enabled 'mgv6_freq_desert' is ignored.
|
# When snowbiomes are enabled 'mgv6_freq_desert' is ignored.
|
||||||
|
@ -313,7 +313,7 @@ void set_default_settings(Settings *settings)
|
|||||||
settings->setDefault("water_level", "1");
|
settings->setDefault("water_level", "1");
|
||||||
settings->setDefault("chunksize", "5");
|
settings->setDefault("chunksize", "5");
|
||||||
settings->setDefault("mg_flags", "dungeons");
|
settings->setDefault("mg_flags", "dungeons");
|
||||||
settings->setDefault("mgv6_spflags", "jungles, snowbiomes");
|
settings->setDefault("mgv6_spflags", "jungles, snowbiomes, trees");
|
||||||
|
|
||||||
// IPv6
|
// IPv6
|
||||||
settings->setDefault("enable_ipv6", "true");
|
settings->setDefault("enable_ipv6", "true");
|
||||||
|
@ -46,6 +46,7 @@ FlagDesc flagdesc_mapgen[] = {
|
|||||||
{"dungeons", MG_DUNGEONS},
|
{"dungeons", MG_DUNGEONS},
|
||||||
{"flat", MG_FLAT},
|
{"flat", MG_FLAT},
|
||||||
{"light", MG_LIGHT},
|
{"light", MG_LIGHT},
|
||||||
|
{"decorations", MG_DECORATIONS},
|
||||||
{NULL, 0}
|
{NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#define MG_DUNGEONS 0x04
|
#define MG_DUNGEONS 0x04
|
||||||
#define MG_FLAT 0x08
|
#define MG_FLAT 0x08
|
||||||
#define MG_LIGHT 0x10
|
#define MG_LIGHT 0x10
|
||||||
|
#define MG_DECORATIONS 0x20
|
||||||
|
|
||||||
class Settings;
|
class Settings;
|
||||||
class MMVManip;
|
class MMVManip;
|
||||||
@ -126,7 +127,7 @@ struct MapgenParams {
|
|||||||
chunksize(5),
|
chunksize(5),
|
||||||
seed(0),
|
seed(0),
|
||||||
water_level(1),
|
water_level(1),
|
||||||
flags(MG_TREES | MG_CAVES | MG_LIGHT),
|
flags(MG_CAVES | MG_LIGHT | MG_DECORATIONS),
|
||||||
np_biome_heat(NoiseParams(50, 50, v3f(750.0, 750.0, 750.0), 5349, 3, 0.5, 2.0)),
|
np_biome_heat(NoiseParams(50, 50, v3f(750.0, 750.0, 750.0), 5349, 3, 0.5, 2.0)),
|
||||||
np_biome_heat_blend(NoiseParams(0, 1.5, v3f(8.0, 8.0, 8.0), 13, 2, 1.0, 2.0)),
|
np_biome_heat_blend(NoiseParams(0, 1.5, v3f(8.0, 8.0, 8.0), 13, 2, 1.0, 2.0)),
|
||||||
np_biome_humidity(NoiseParams(50, 50, v3f(750.0, 750.0, 750.0), 842, 3, 0.5, 2.0)),
|
np_biome_humidity(NoiseParams(50, 50, v3f(750.0, 750.0, 750.0), 842, 3, 0.5, 2.0)),
|
||||||
|
@ -296,6 +296,7 @@ void MapgenFlat::makeChunk(BlockMakeData *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate the registered decorations
|
// Generate the registered decorations
|
||||||
|
if (flags & MG_DECORATIONS)
|
||||||
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Generate the registered ores
|
// Generate the registered ores
|
||||||
|
@ -310,6 +310,7 @@ void MapgenFractal::makeChunk(BlockMakeData *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate the registered decorations
|
// Generate the registered decorations
|
||||||
|
if (flags & MG_DECORATIONS)
|
||||||
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Generate the registered ores
|
// Generate the registered ores
|
||||||
|
@ -296,6 +296,7 @@ void MapgenV5::makeChunk(BlockMakeData *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate the registered decorations
|
// Generate the registered decorations
|
||||||
|
if (flags & MG_DECORATIONS)
|
||||||
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Generate the registered ores
|
// Generate the registered ores
|
||||||
|
@ -43,6 +43,7 @@ FlagDesc flagdesc_mapgen_v6[] = {
|
|||||||
{"mudflow", MGV6_MUDFLOW},
|
{"mudflow", MGV6_MUDFLOW},
|
||||||
{"snowbiomes", MGV6_SNOWBIOMES},
|
{"snowbiomes", MGV6_SNOWBIOMES},
|
||||||
{"flat", MGV6_FLAT},
|
{"flat", MGV6_FLAT},
|
||||||
|
{"trees", MGV6_TREES},
|
||||||
{NULL, 0}
|
{NULL, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -580,10 +581,11 @@ void MapgenV6::makeChunk(BlockMakeData *data)
|
|||||||
growGrass();
|
growGrass();
|
||||||
|
|
||||||
// Generate some trees, and add grass, if a jungle
|
// Generate some trees, and add grass, if a jungle
|
||||||
if (flags & MG_TREES)
|
if ((spflags & MGV6_TREES) || (flags & MG_TREES))
|
||||||
placeTreesAndJungleGrass();
|
placeTreesAndJungleGrass();
|
||||||
|
|
||||||
// Generate the registered decorations
|
// Generate the registered decorations
|
||||||
|
if (flags & MG_DECORATIONS)
|
||||||
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Generate the registered ores
|
// Generate the registered ores
|
||||||
|
@ -37,6 +37,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#define MGV6_MUDFLOW 0x04
|
#define MGV6_MUDFLOW 0x04
|
||||||
#define MGV6_SNOWBIOMES 0x08
|
#define MGV6_SNOWBIOMES 0x08
|
||||||
#define MGV6_FLAT 0x10
|
#define MGV6_FLAT 0x10
|
||||||
|
#define MGV6_TREES 0x20
|
||||||
|
|
||||||
|
|
||||||
extern FlagDesc flagdesc_mapgen_v6[];
|
extern FlagDesc flagdesc_mapgen_v6[];
|
||||||
|
@ -317,6 +317,7 @@ void MapgenV7::makeChunk(BlockMakeData *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Generate the registered decorations
|
// Generate the registered decorations
|
||||||
|
if (flags & MG_DECORATIONS)
|
||||||
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
m_emerge->decomgr->placeAllDecos(this, blockseed, node_min, node_max);
|
||||||
|
|
||||||
// Generate the registered ores
|
// Generate the registered ores
|
||||||
|
Loading…
Reference in New Issue
Block a user