aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen/mapgen_flat.cpp
AgeCommit message (Collapse)Author
2022-04-08Spacing fixesShadowNinja
2020-11-26Avoid generating the same chunk more than once with multiple emerge threads.Lars
2020-09-03Add 'ores' global mapgen flag (#10276)Paramat
2020-08-05Mapgen Flat: Add caverns, disabled by default (#9913)Paramat
Add the caverns used in V5, V7, Valleys, Carpathian. Disabled by default to not be force-enabled in existing worlds.
2020-05-05Give the Mapgen on each EmergeThread its own Biome/Ore/Deco/SchemManager copysfan5
2020-04-11Drop content_sao.{cpp,h}Loic Blot
Move LuaEntitySAO to a new dedicated file Drop TestSAO (useless object) Drop the old static startup initialized SAO factory, which was pretty useless. This factory was using a std::map for 2 elements, now just use a simple condition owned by ServerEnvironment, which will be lightweight, that will also drop a one time useful test on each LuaEntitySAO creation. This should reduce server load on massive SAO creation
2020-01-25Settings: Add get_flags API for mapgen flags (mg_flags, mgv6_spflags, ...) ↵SmallJoker
(#9284) Unified flags handling in C++ and Lua Settings API -> Reading only, for now. Writing can be implemented later, if needed. API function to read the currently active flags -> was impossible from Lua Co-authored-by: Wuzzy <wuzzy2@mail.ru>
2019-11-23Dungeons: Move duplicated y limit checks to generation functionparamat
2019-11-18Randomwalk cave liquids: Remove deprecated 'lava depth' parameter (#9105)Paramat
Low-disruption first step towards removing the hardcoded cave liquid code. Since MT 5.0.0 cave liquids can be defined and located by biome definitions instead. In games that do not yet use biome definitions to define and locate cave liquids (MTGame does), lava will now appear below y = water_level - 256 instead of below 'lava depth' (usually y = -256). Therefore no change in most mapgens if using the default 'lava depth'.
2019-11-08Randomwalk caves: Add parameters for number, proportion flooded. Allow small ↵Paramat
caves (#8928) Add mapgen parameters to set the range of the random number of randomwalk caves per mapchunk, and to set the proportion that are flooded with liquids. Default values are, for now, unchanged from the previous hardcoded values. Add parameters to allow small randomwalk caves Disabled by default for now as they have never been present in the non-mgv6 mapgens.
2019-08-06Mapgen Flat: Fix and improve getSpawnLevelAtPoint() (#8756)Paramat
Previously, this wrongly returned ground level (a position containing a solid node) as spawn level. Return ground level + 2 (+ 2 to spawn above biome 'dust' nodes). Improve codestyle and make more consistent with generateTerrain().
2019-06-01Dungeons: Settable density noise, move number calculation to mapgens (#8473)Paramat
Add user-settable noise parameters for dungeon density to each mapgen, except V6 which hardcodes this noise parameter. Move the calculation of number of dungeons generated in a mapchunk out of dungeongen.cpp and into mapgen code, to allow mapgens to generate any desired number of dungeons in a mapchunk, instead of being forced to have number of dungeons determined by a density noise. This is more flexible and allows mapgens to use dungeon generation to create custom structures, such as occasional mega-dungeons.
2019-03-31mapgen: drop mapgen id from child mapgens.Loïc Blot
This id must be owned by the child mapgen and never be set to a misc value by a developer Also use nullptr in some places
2018-08-20Change mapgen order to ores > dungeons > decorations (#7656)Paramat
Previously dungeons > decorations > ores. Decorations depend on the node they are placed on, and ore types are increasingly able to place large continuous volumes of nodes, such as strata. Decorations are increasingly being used underground. The new order avoids a node being changed by ore generation after a decoration has been placed on it. The new order also avoids ores appearing in the walls of a dungeon if the wall nodes match the local stone node.
2018-06-08Mapgen flags: Add 'biomes' global mapgen flag (#7355)Paramat
Previously the only way to disable biomes was to 'clear' the registered biomes in a mod, but this method causes large amounts of unnecessary processing: 1. Calculation of 4 2D noises. 2. Looping through all nodes of a mapchunk replacing nodes with identical nodes. The new flag disables those operations.
2018-04-29Mapgen caves: Re-order generation to fix cavern bugParamat
Previously, caverns confused tunnel generation causing biome top and filler nodes to appear in caverns. Split 'generateCaves()' into 2 functions to separate tunnel and large randomwalk cave generation. In each mapgen re-order cave generation to generate tunnels before caverns.
2018-04-07Biome API / dungeons: Add biome-defined dungeon nodesParamat
Add new biome fields 'node_dungeon', 'node_dungeon_alt', 'node_dungeon_stair'. If 'node_dungeon' is not defined dungeons fall back to classic behaviour. Remove messy and imprecise dungeon material code from 'generateBiomes()'. Code deciding dungeon materials is now in 'generateDungeons()' and uses the biome at mapchunk centre for more precision. Remove hardcoded 'MG_STONE' types as long intended.
2018-03-09VoxelArea: add_{x,y,z,p} must be staticLoic Blot
Fix some documentations issues Use getNodeNoCheck(v3s16, ...) in some cases instead of getNodeNoCheck(x, y, z, ...)
2018-02-20Dungeons: Add Y limits in all mapgensparamat
Preserve the upper limit used in mgvalleys.
2018-01-15Mapgen folder: Update and improve copyright information of filesparamat
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around