aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen
Commit message (Collapse)AuthorAge
* Mainmenu game-related changes (#11887)sfan52022-01-09
| | | | | | | fixes: * Switching between games does not immediately hide creative mode / damage buttons if so specified * World creation menu has a game selection list even though the menu already provides a gamebar * Showing gameid in world list is unnecessary * Choice of mapgen parameters in menu persists between games (and was half-broken)
* Remove a few unused functions reported by callcatcher (#11658)SmallJoker2021-10-12
|
* Switch MapBlock compression to zstd (#10788)lhofhansl2021-08-31
| | | | | | | * Add zstd support. * Rearrange serialization order * Compress entire mapblock Co-authored-by: sfan5 <sfan5@live.de>
* Fix access violation in create_schematic() (#11534)Treer2021-08-16
| | | | | fixes #11533 Schematics saved from y locations greater than 0 would cause an access violation if layer probabilities were specified
* Fix broken `BiomeGen` abstraction (#11107)sfan52021-03-23
|
* Schematic: Properly deal with before/after node resolving and document (#11011)SmallJoker2021-03-20
| | | | This fixes an out-of-bounds index access when the node resolver was already applied to the schematic (i.e. biome decoration). Also improves the handling of the two cases: prior node resolving (m_nodenames), and after node resolving (manual lookup)
* Fix function override warnings in mg_ore.hsfan52021-03-06
|
* Remove dead code (#10845)rubenwardy2021-01-22
|
* MgOre: Fix invalid field polymorphism (#10846)rubenwardy2021-01-21
|
* Removed some obsolete code (#10562)Zughy2021-01-21
| | | Co-authored-by: Zughy <4279489-marco_a@users.noreply.gitlab.com>
* Fix some minor code issues all over the placesfan52020-12-24
|
* Allow configuring block disk and net compression. Change default disk level.Lars2020-12-15
|
* Avoid generating the same chunk more than once with multiple emerge threads.Lars2020-11-26
|
* Move Mapgen V7 river generation into the main generation loop (#10639)Paramat2020-11-20
| | | | | | | | | | All terrain generation now occurs in one loop, instead of rivers being carved afterwards in a separate loop. Fixes the removal of nodes added by mods in 'register on generated'. Avoids other problems and reduces the chance of future bugs. Mapchunk generation time is reduced. Also fixes a code mistake which resulted in river channel generation being disabled at floatland altitudes even when floatlands were disabled.
* Fix warnings about an unused variables and implicit conversion (#10586)red-0012020-11-12
|
* Remove unused functions reported by cppcheck (#10463)SmallJoker2020-10-05
| | | | | | | Run unused functions reported by cppcheck This change removes a few (but not all) unused functions. Some unused helper functions were not removed due to their complexity and potential of future use.
* (se)SerializeString: Include max length in the nameSmallJoker2020-10-01
| | | | | | | This commit clarifies the maximal length of the serialized strings. It will avoid accidental use of serializeString() when a larger string can be expected. Removes unused Wide String serialization functions
* Add 'ores' global mapgen flag (#10276)Paramat2020-09-03
|
* Mapgen Flat: Add caverns, disabled by default (#9913)Paramat2020-08-05
| | | | Add the caverns used in V5, V7, Valleys, Carpathian. Disabled by default to not be force-enabled in existing worlds.
* L-System trees: Remove hardcoded use of 'mapgen_dirt' alias (#9931)Paramat2020-05-25
| | | | | | | | | | | | | | Games often and increasingly do not use this mapgen alias, as it is only required for Mapgen V6. Such games were triggering the recently added error message. Even if this mapgen alias was defined, dirt nodes placed under a wide trunk were inconsistent with biomes that do not use dirt surface nodes. Place trunk nodes below a wide trunk instead of 'mapgen_dirt'. On sloping ground, the trunk then extends down to the surface, instead of the surface rising up to meet the trunk. This looks more natural and does not alter the terrain.
* Allow more than 255 biomes, document new maximum (#9855)Paramat2020-05-20
| | | | Change biomemap data type from u8 to u16. New technical (not practical) maximum is 65535 biomes.
* Add new Mapgen V7 floatland implementation (#9296)Paramat2020-05-14
| | | | | | | | | | | | Floatland structure is vertically-compressed 3D noise. Uses a lacunarity of 1.618 (the golden ratio) for high quality noise. Floatlands appear between user-settable Y limits, with smooth tapering at each limit. Simple user-settable density adjustment. Shadow propagation is disabled in and just below floatlands, no shadows are cast on the world surface. Can be reconfigured to create a solid upper world layer between the Y limits, lakes/seas can be optionally added to this.
* Fix thread safety of PcgRandom use in BiomeGensfan52020-05-05
|
* Fix remaining issues with mapgen scriptapisfan52020-05-05
|
* Give the Mapgen on each EmergeThread its own Biome/Ore/Deco/SchemManager copysfan52020-05-05
|
* Allow ObjDefManager instances to be clonedsfan52020-05-05
|
* Reduce ServerEnvironment propagation (#9642)Loïc Blot2020-04-11
| | | | | | | | | | ServerEnvironment is a huge class with many accessors. In various places it's not needed Remove it to reduce the ServerEnvironment view. Idea here is to reduce size of some of our objects to transport lightweight managers and permit easier testing Pathfinder is now tied to a generic map, not a ServerMap, it can be ported to client
* Drop content_sao.{cpp,h}Loic Blot2020-04-11
| | | | | | | 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
* Move serveractiveobject & unitsaoLoic Blot2020-04-11
| | | | | Move serverobject.{cpp,h} to server/serveractiveobject.{cpp,h} Move UnitSAO class to dedicated files
* Print error if invalid mapgen alias was detected (#9579)Wuzzy2020-04-10
|
* Fix 'the the' typos in comments (#9554)LNJ2020-04-04
|
* Remove unnecessary checks before delete (#9500)Nicolas Abril2020-03-10
| | | Co-authored-by: Nicolas Abril <nicolasabril@alunos.utfpr.edu.br>
* Settings: Add get_flags API for mapgen flags (mg_flags, mgv6_spflags, ...) ↵SmallJoker2020-01-25
| | | | | | | | | | | (#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>
* Remove Mapgen V7 floatlands in preparation for new implementation (#9238)Paramat2020-01-04
| | | | Preserve the floatland flag of existing worlds, to be used again when the new implementation is added.
* Caves: Fix shadowing of 'large_cave_depth' to avoid confusionparamat2019-11-23
|
* Dungeons: Move duplicated y limit checks to generation functionparamat2019-11-23
|
* Move duplicated mapgen parameters to class MapgenBasic (#9134)Paramat2019-11-19
| | | 'large_cave_depth', 'dungeon_ymin' and 'dungeon_ymax' are duplicated across many mapgens so should have been in class MapgenBasic from the start.
* Randomwalk cave liquids: Remove deprecated 'lava depth' parameter (#9105)Paramat2019-11-18
| | | | | | | | | 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'.
* Randomwalk caves: Extend beyond mapchunk vertically also (#9094)Paramat2019-11-10
| | | | | Previously, randomwalk caves only extended beyond the mapchunk borders horizontally, preventing vertical overlap and interconnection.
* Tunnels: Completely disable generation when 'cave width' >= 10.0 (#9093)Paramat2019-11-09
| | | | | | | | | Previously, the only way to disable the 3D noise tunnels was to set 'cave width' > 1.0, however doing so did not disable the very intensive noise calculations or the generation loop. All the other types of cave generation (randomwalk caves, caverns) can already be independently and completely disabled. This feature is now needed more because the small randomwalk caves are now available for use as an alternative to the 3D noise tunnels.
* Randomwalk caves: Add parameters for number, proportion flooded. Allow small ↵Paramat2019-11-08
| | | | | | | | | | | | | | 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.
* Change some usages of "deprecated" to "obsolete" (#9062)random-geek2019-10-29
| | | | "Deprecated" means that something is still in use, but is unsupported and needs to be removed. "Obsolete" means it is already out of use.
* Randomwalk caves: Reduce 'insure' value from 10 to 2 (#9035)Paramat2019-10-13
| | | | | | | | | This value reduces how far randomwalk caves can extend into the mapchunk padding, to avoid 'out of voxelmanip' cave nodes which cause flattened cave walls. Testing shows that a value of 2 (instead of 10) is enough to make 'out of area' nodes extremely rare. Reducing this value results in a higher chance of overlap and connection with caves of neighbour mapchunks.
* Fix some reference counters (memleak) (#8981)SmallJoker2019-09-24
| | | | | Fix some reference counters (memleak) Map::dispatchEvent: Allocation safety using references
* Dungeons: Clean up parameters, improve structure variety (#8918)Paramat2019-09-14
| | | | | | | | | | | | | While preserving the general character of dungeon structure. Slightly increase the range of standard room horizontal size, while preserving the average horizontal size. Return to classic maximum large room size of 16x16x16. Make 1 in 4 dungeons have a 1 in 8 chance for each room being 'large', making multiple large rooms possible for the first time. Make 1 in 8 dungeons allow diagonal corridors, to make these a little more common. Make corridor width vary from 1 to 2, but forced to 2 if diagonal corridors are allowed, to make them passable. Add some comments.
* Dungeons: Remove non-functional 'projecting dungeons' setting (#8897)Paramat2019-09-08
|
* Mapgen v6: Various mudflow code improvements and bugfixes (#8805)Paramat2019-08-24
| | | | | | | | | | | | | | | Calculate 'i' inside 'y' loop to avoid 'i' and 'y' becoming out of step due to the uses of 'continue'. Simplify calculation of 'p2d' when coordinates are inverted. Remove some unnecessary and unreliable 'index out of voxelmanip' checks. Move calculation of '&em' out of loops. For 'Loop further down until not air' code, use y coordinate to detect being out of voxelmanip, instead of checking index which did not detect that. Add and improve comments. Indent the 'for (;; y--) {' loop. Improve format and fix codestyle issues.
* Make Mapgen::spreadLight use a queue (#8838)DS2019-08-23
|
* Mapgen v6: Fix mudflow iteration and iterate twice (#8795)Paramat2019-08-15
| | | | | | | | | | In MapgenV6::flowMud(), the previous implementation of coordinate inversion caused the 2 inverted mudflow iterations (out of the 3 iterations) to not loop over the area, so only 1 non-inverted iteration occurred. Fix this bug but only iterate mudflow twice, as mapgen v6 has only had 1 iteration for many years. There is now a good balance of 1 non-inverted iteration and 1 inverted iteration.
* Better F6 profiler (#8750)SmallJoker2019-08-13
| | | | | | | Update the profiler names to make more sense of what they actually represent Move the profiler code from header to its source file Use monospace font to align lines Format the statistics line to align better with surrounding values Refresh the profiler each 3 seconds (roughly)