| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
| |
* Modernize various files (src/m*)
* range-based for loops
* code style
* C++ headers instead of C headers
* Default operators
* empty function
Thanks to clang-tidy
|
|
|
|
| |
* Migrate cpp headers to pragma once
|
|
|
|
|
|
|
|
| |
Allows setting of the mountain 'zero level' (y where density gradient is zero).
It is easy to vertically shift smooth terrain by editing noise parameter 'offset',
but vertically shifting mountain terrain was complex and imprecise, involving
making a calculation based on an average of the mountain height parameter.
|
| |
|
| |
|
|
|
|
|
| |
Some settings of paramters can cause mgv7 variables to be -inf, nan or -nan.
This can cause massive vertical columns of water to appear above sea level.
|
|
|
|
|
|
|
| |
As with 'large_cave_depth', lava depth was previously a fixed y value and
therefore incompatible with the ability to shift terrain vertically.
Add 'lava_depth' mapgen parameter to mgflat, mgfractal, mgv5, mgv7.
|
|
|
|
|
|
| |
The value cannot be fixed because we can shift terrain vertically.
This also makes these mapgens consistent with mgflat and mgvalleys which
have 'large_cave_depth' parameters.
|
|
|
|
|
|
|
|
|
|
| |
* C++11 patchset 10: continue cleanup on constructors
* Drop obsolete bool MainMenuData::enable_public (setting is called with cURL in server loop)
* More classes cleanup
* More classes cleanup + change NULL tests to boolean tests
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add to MapgenBasic for use by multiple mapgens.
Add to mgv5 and mgv7, enabled by default.
Similar to mgvalleys caverns but half the scale.
Parameters for upper y limit, distance caverns taper to full size, and
noise threshold (full cavern size).
As with mgvalleys caverns are generated first and classic caves are
disabled in any mapchunk containing a cavern, to avoid excessive
spreading volumes of liquids.
This also avoids floating blobs of liquid where a large classic cave
has overgenerated out into a neighbouring previously-generated mapchunk.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit refactors the majority of the Mapgen settings system.
- MapgenParams is now owned by MapSettingsManager, itself a part of ServerMap,
instead of the EmergeManager.
- New Script API functions added:
core.get_mapgen_setting
core.get_mapgen_setting_noiseparams,
core.set_mapgen_setting, and
core.set_mapgen_setting_noiseparams.
- minetest.get/set_mapgen_params are deprecated by the above new functions.
- It is now possible to view and modify any arbitrary mapgen setting from a mod,
rather than the base MapgenParams structure.
- MapgenSpecificParams has been removed.
|
|
|
|
|
|
| |
- Move mapgen creation logic out of EmergeManager and into Mapgen
- Internally represent mapgen type as an enum value, instead of a string
- Remove the need for a MapgenFactory per mapgen
|
| |
|
| |
|
|
|
|
|
|
| |
This commit moves noise calculation to the functions where the noise is
actually required, increasing the separation of concerns and level of
interdependency for each mapgen method. Valleys Mapgen is left unmodified.
|
| |
|
|
|
|
|
| |
This commit condenses the above methods into a single implementation used by
V7, V5, Flat, Fractal, and Valleys mapgens and introduces MapgenBasic.
|
|
|
|
|
|
|
| |
BiomeGen defines an interface that, given a set of BiomeParams, computes biomes
for a given area using the algorithm implemented by that specific BiomeGen.
This abstracts away the old system where each mapgen supplied the noises
required for biome generation.
|
|
|
|
|
|
| |
Correct parameter names mg_valleys to mgvalleys
Remove biome NoiseParams from MapgenValleysParams
Improve format of parameter code
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous mountain terrain generation was by necessity placing
stone in air, this was removing air from any overgenerated
structures such as tunnels, dungeons and large caves
Moving it into the base terrain generation loop ensures that
only 'ignore' is replaced
generateRidgeTerrain: only return if node_max.Y < water_level - 16
Previously, if water level was set a few nodes above a mapchunk
border the river channel was only partially excavated
|
|
|
|
|
|
| |
Instead of doing nothing at node_max.Y + 1 use 1-down
overgeneration for tunnel generation and noisemaps
Move some old unused code in mgv7 to end of file
|
|
|
|
|
|
|
|
|
|
|
|
| |
To avoid spawn search failing in new specialised mapgens
Increase spawn search range to 4000 nodes
Add getSpawnLevelAtPoint() functions to EmergeManager, class Mapgen
and all mapgens
Remove getGroundLevelAtPoint() functions from all mapgens except mgv6
(possibly to be re-added later in the correct form to return actual
ground level)
Make mgvalleys flag names consistent with other mapgens
Remove now unused 'vertical spawn range' setting
|
|
|
|
|
| |
Update copyright years in all mapgens
Add myself to copyright notices in mgv5 and mgv7
|
|
|
|
|
| |
Lowest level of base terrain determines mountain generation in mapchunk
Change some positional function arguments from int to s16
|
| |
|
| |
|
|
|
|
| |
Decorations: Remove lower limit of water level for placement
|
|
|
|
| |
-192 for mgv5 deep oceans. Improve code
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Use/add stone_surface_max_y to speed-optimise/guide dungeon generation
MgV7: Don't let mountain terrain chop dungeons at mapchunk borders
Make mountain terrain update stone_surface_max_y for caves in mountains
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Add support for notify-on-decoration
Clean up mapgen constructors
Clean up mapgen.cpp code style somewhat
Remove trailing whitespace from some files
|
|
|
|
| |
Add BiomeManager, OreManager, DecorationManager, and SchematicManager
|
|
|
|
|
|
| |
MapgenParams is no longer a polymorphic class, eliminating the need for messy and bug-prone reallocations.
Separation between the common and mapgen-specific parameters is now strongly defined.
Mapgen parameters objects are now properly encapsulated within the proper subsystems.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|