aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen_v6.cpp
Commit message (Collapse)AuthorAge
* Code modernization: src/m* (part 2)Loic Blot2017-08-19
| | | | | | | | | * empty function * default constructor/destructor * remove unused Map::emergeSector(a,b) * for range-based loops * migrate a dirs[7] table to direction tables * remove various old unused function
* Modernize various files (src/m*) (#6267)Loïc Blot2017-08-18
| | | | | | | | | | | | * 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
* VoxelManip cleanups (const ref, const move) + function removal (#6169)Loïc Blot2017-07-26
| | | | | | | | | | * VoxelManip cleanups (const ref, const move) permitting to improve a little bit performance * VoxelArea: precalculate extent (performance enhancement) This permits to reduce extend high cost to zero and drop many v3s16 object creation/removal to calculate extent It rebalance the client thread update to updateFastFaceRow instead of MapBlockMesh generation This will also benefits to mapgen
* Biomes/decorations/ores: Make relative to 'water_level' settingparamat2017-07-11
| | | | | | | | Add 'biome_zero_level' argument to 'generateBiomes()', 'deco_zero_level' argument to 'placeAllDecos()' and 'ore_zero_level' to 'placeAllOres()' to allow mapgens to vertically shift the registered biomes, decorations and ores per-mapchunk. Will also allow many realm possibilities in future mapgens.
* Mapgen: Remove unnecessary 'this->' from constructors (#6069)Paramat2017-06-30
|
* Cpp11 initializers 2 (#5999)Loïc Blot2017-06-17
| | | | | | | | | | * 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
* Mgv6 mudflow: Also check for 'ignore' nodesparamat2017-06-16
| | | | | | | | | | Previously, when removing decorations we searched upwards and removed until we found air or water. However, the node above the decoration can be 'ignore' if a stacked decoration extends into the volume above the mapchunk. The result could be a problematic column of air placed in the volume of 'ignore'. The unnecessary placing of air also slows the function. Add a check for 'ignore' nodes when removing decorations.
* Mgv6 mudflow: Avoid partially removed stacked decorationsparamat2017-06-15
| | | | | | | | | | | | Recently we started to remove decorations if the dirt below was flowed away, but this did not check for stacked decorations, causing them to have only their lowest node removed. Also, placed mud could partially bury stacked decorations. Remove 'old_is_water' bool which on testing is never true. Add new function 'moveMud()' to reduce indentation. Remove stacked decoration nodes above a removed decoration. Remove stacked decorations partially buried in placed mud.
* Mapgen v6: Use snow blocks in tundra and remove them from taiga (#5827)Casimir2017-06-04
| | | | | | * Mapgen v6: Use snow blocks in tundra and remove them from taiga * Use snowblocks in tundra above dirt with snow
* Mapgen files: Update and correct copyright creditsparamat2017-05-26
|
* Mgv6 mudflow: Remove decoration if 'dirt with grass' below flows away (#5798)Paramat2017-05-25
| | | | | | | Mudflow of a neighbouring mapchunk extends into a mapchunk's edge, and could remove 'dirt with grass' from under a decoration, creating unsupported decorations. Remove any decoration above if a 'dirt with grass' node is removed by mudflow.
* Dungeongen: Add and improve parametersparamat2017-02-26
| | | | | | | | | | | | | | | | | | Add: Bool for 'only_in_ground'. Min and max corridor length. Min and max room size with X, Y, Z components. Min and max large room size with X, Y, Z components. 'only_in_ground = false' allows core mapgens to create structures in air and water using dungeongen. Corridor length parameters replace a fixed random range. Room size parameters replace the former system where one parameter 'roomsize' was added to fixed random ranges. All parameters are set for no change to current dungeon behaviour. Remove some now-redundant and long-unused code.
* Mgv6: Add fallback node for gravelparamat2017-02-04
| | | | | | | | Gravel now falls back to stone. Gravel is not a particularly fundamental node, allowing it to fall back to stone frees up subgames from having to include a gravel node. Non-blob-ore gravel is only present in mgv6 as extremely rare 'gravel biomes'.
* Mgv6: Add stairs to desert stone dungeonsparamat2017-02-04
| | | | | | As with the other mapgens, now that wide stairs in dungeons are possible we can now finally add stairs to desert stone dungeons. Re-order some lines.
* Mapgen: Remove unused 'flat' and 'trees' flags from mg_flagsparamat2016-08-04
| | | | | | | | | | | | | | | | When the 'flat' and 'trees' flags were moved into mgv6_spflags they were left in mg_flags in an attempt to support old mgv6 worlds. However their appearence in mg_flags causes confusion, also, later, old-world support was found to be broken for mgv6 worlds with 'notrees'. This commit cleans up the mess and comes a month after a thread warning of the change, and explaining the required action, was posted in the news subforum. Only old mgv6 worlds with 'flat' or 'notrees' are affected, a small minority of worlds, the required action being correctly setting these flags in mgv6_spflags. Disable a section of the 'map settings manager' unit test which is to be changed as it is causing problems for pull requests.
* Add MapSettingsManager and new mapgen setting script API functionskwolekr2016-07-03
| | | | | | | | | | | | | | | 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.
* Dungeons: Generalise use, add capabilities, various modificationsparamat2016-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Generalise node names to c_wall and c_alt_wall - Remove 'mossratio' and instead disable alt_wall loop if c_alt_wall == CONTENT_IGNORE - Use one generalised 3D noise for alternative wall nodes and in mgv6 create moss distribution similar to the previous - Rename rarity noise to density noise and enable the option of multiple dungeons per chunk determined by the value. Recreate previous distribution - Add parameters for min and max rooms per dungeon - Add dungeon y limits - Integrate river water properly Generalisation is needed now that we have sandstone and desert stone dungeons by default and can choose any node for alternative structure. The current code is based around cobble dungeons with mossycobble alternative nodes, the 2 noises controlling the alternative nodes are based on wetness. Enabling multiple dungeons per chunk with definable number of rooms allows the option of very dense and complex underground structures that could interconnect to create megastructures. Y limits are added to be consistent with other mapgen elements, and enable locaton of dungeon or megastructure realms as part of our 'stacked realms' philosophy.
* Dungeongen: Remove dependency on Mapgenkwolekr2016-05-27
|
* Cavegen: Remove CavesV6 dependency on Mapgenkwolekr2016-05-27
|
* Cavegen: Rename CaveV6 to CavesV6kwolekr2016-05-27
| | | | | | | - Add comment explaining why it exists - Remove unused 'flooded' variable - Rename shadowed variable - Fix some code style
* Mapgen V6: Synchronize spflags with defaultsettingskwolekr2016-05-10
| | | | | This fixes an issue where trees are omitted from Mapgen V6 maps on configurations that explicitly defined the mgv6_spflags setting.
* FindSpawnPos: Let mapgens decide what spawn altitude is suitableparamat2016-02-09
| | | | | | | | | | | | 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
* Mapgen: Various fixes and improvementsparamat2016-01-11
| | | | | | | | | | | | | Lua_api.txt: Document 'minetest.registered_biomes' Minimal: Remove 'mapgen_air' alias Cavegen: Add fallback node for 'mapgen_ice' Dungeongen: Add fallback node for 'mapgen_river_water_source' Mgv5: Remove unnecessary '#include util/directiontables.h' Add missing 'this->'s in makeChunk() Mgv6: Edit empty line formatting Remove leading spaces in makeChunk() Add missing spaces after 'for' and 'if' Mgv7: Edit empty line formatting
* Mapgen: Add propagate_shadow bool to calcLightingparamat2015-12-07
| | | | | | | | | | To terminate unwanted shadows from floatlands or realms above Also add to LuaVoxelManip calc_lighting for use in mapgen mods Remove the 2 argument calcLighting, mapgens now use the 5 argument form to specify the volumes for propagateSunlight and spreadLight In mgsinglenode replace calcLighting with setLighting and clean-up use of tabs and spaces
* Mapgen: Add global 'decorations' flagparamat2015-11-21
| | | | | | | | | | 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
* Mgv6: Move global mapgen flag 'flat' into mgv6 spflagsparamat2015-11-13
| | | | | Add mgv6 spflag 'flat' Global flag is kept for backwards compatibility but is now undocumented
* Mapgen: Use mapgen-specific names for constants in headersparamat2015-10-09
| | | | | Update copyright years in all mapgens Add myself to copyright notices in mgv5 and mgv7
* Define and use limit constants for Irrlicht fixed-width typeskwolekr2015-10-04
|
* Various style cleanups + unused code removalest312015-09-19
| | | | | | | | | | -> Don't pass pointer to whole IGameDef to NodeMetadata constructors and deserializers, but only to IItemDefManager, which is needed -> Remove the unused content_mapnode_get_new_name() method -> Fix style for MapBlock::deSerialize and MapBlock::deSerialize_pre22, improving accuracy of error messages a bit -> Fix style at other serialisation methods too -> Improve accuracy of some comments
* Mgv5/6/7: Re-add #include profiler.h as commented-out optionparamat2015-09-19
|
* Add map limit config optionrubenwardy2015-08-02
|
* Remove profiler.h include where it's not needed. Remove some unreachable and ↵Loic Blot2015-07-21
| | | | very old code
* Mgv6/treegen: (Re)Add fallback nodes for compatibility with subgamesparamat2015-07-13
|
* Mgv6: Don't create air gap in tundra at y = 48 in custom high terrainparamat2015-06-18
|
* Mgv6: Enable snowbiomes by default. Double biome noise spread. 3 octaves, ↵paramat2015-05-26
| | | | 0.5 persistence for humidity
* Mapgen v5/6/7: Cleanup node resolver and aliasesparamat2015-05-12
|
* Mgv6: Fix taiga, allow pine tree spawning on snowblocksparamat2015-04-12
|
* Mgv6: Add optional snow biomesparamat2015-04-12
|
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
| | | | | | | | | | | | Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
* Mgv6: Use heightmap in placeTreesAndJungleGrass()paramat2015-03-23
|
* Mgv6: Remove addDirtGravelBlobs, replaced by blob ore in Minetest Gameparamat2015-03-18
| | | | | Desert stone above y = -32 not water_level Remove unused generateExperimental()
* Mgv6: Fix uninitialised heightmap used by cavegenparamat2015-03-11
|
* Ensure that heightmap is initialized before useCraig Robbins2015-03-10
| | | | Without this, cavegen will use values in the heightmap before they are initialized.
* Heightmaps: Fix uninitialised values in mgv5/mgv6. findGroundLevel: Return ↵paramat2015-03-08
| | | | -MAP_GENERATION_LIMIT if surface not found
* Respect game mapgen flags and save world noise paramsngosang2015-03-07
|
* For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins2015-03-07
| | | | NDEBUG is defined), replace those usages with persistent alternatives
* Fix mapgen using unitialised height map valuesCraig Robbins2015-03-06
|
* Fix memory leak in MapgenV6Craig Robbins2015-03-05
|
* Mgv6: Add heightmap. Do not make large caves that are entirely above groundparamat2015-03-02
|
* Fix all warnings and remove -Wno-unused-but-set cflagkwolekr2015-01-18
|