summaryrefslogtreecommitdiff
path: root/src/mapgen/dungeongen.h
Commit message (Collapse)AuthorAge
* 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: Make multiple large rooms possible (#8678)Paramat2019-07-16
| | | | | | | | | Re-add the random size range for large rooms. Remove 'first_room_large' bool. Add 'large_room_chance' parameter that can disable large rooms, specify 1 large room, or specify a chance for large rooms. If 1 or a chance is specified, the first generated room is large, to take advantage of the intersection checks that are done for the 1st room only.
* Move more dungeon parameter selection to mapgens (#8653)Paramat2019-07-09
| | | | | | | | | | Move 'num_dungeons' to 'DungeonParams'. Add new parameter 'num_rooms' to replace 'rooms_min' and 'rooms_max', so that the mapgen has complete control over the number of rooms. Add new bool 'first_room_large' so that the mapgen chooses this instead of a hardcoded 1 in 4 chance. Add new parameter 'room_size_large' to replace 'room_size_large_min' and 'room_size_large_max', so that the mapgen has complete control over this.
* Dungeongen: Remove most hardcoded dungeon nodes (#8594)Paramat2019-06-30
| | | | | | | | | | | | | | | Biome-defined dungeon nodes was added as a feature to MT 5.0.0. So now remove most of the hardcoded dungeon node code that assumes a game has stone, sandstone, desert stone, and no other stone types. If biome-defined dungeon nodes are not found, dungeon nodes fall back to the 'cobble' mapgen alias if present, if not present they fall back to biome-defined 'stone'. Remove now-unnecessary mapgen aliases from MapgenBasic. Non-mgv6 games now only need to define 3 to 5 mapgen aliases. Document dungeon parameters. Make c_lava_source fallback to c_water_source as both are used as cave liquids.
* Dungeons: Settable density noise, move number calculation to mapgens (#8473)Paramat2019-06-01
| | | | | | | | | | | | 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.
* Optimize random turns in dungeongen (#8129)Jozef Behran2019-04-07
| | | | | | It turns out there is no need to return the new value and preserve the old one in random_turn, the procedure can be made to modify the value in-place. This saves quite a bunch of parameter and return value copying.
* Fix various code issues found by cppcheck (#7741)Paramat2018-09-23
| | | | | Mapgen Singlenode: Remove 'flags' that duplicates a 'class Mapgen' member. Dungeongen: Initialise 'MMVManip *vm' to 'nullptr'. Inventorymanager: Remove assignment error 'found = '.
* Dungeons: Fix duplication of y limit parameters (#7359)Paramat2018-05-20
|
* Dungeons: Avoid generation in multiple liquid nodes and 'airlike'paramat2018-02-13
| | | | | | | | | | | | | | Previously only 'mapgen water source' and 'mapgen river water source' were checked for. Games can use multiple liquid nodes defined for biomes, many of which will not be aliased to those 2 mapgen aliases, causing floating dungeons to generate in some liquids. Now we check for liquid drawtype instead, so can remove liquid nodes from dungeonparams. Also check for 'airlike' drawtype instead of 'CONTENT_AIR' to avoid generation in 'airlike' nodes in some rare situations. This will also be needed for when we add definable biome air nodes.
* Node definition manager refactor (#7016)Dániel Juhász2018-02-10
| | | | | | | | | * Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
* Mapgen folder: Update and improve copyright information of filesparamat2018-01-15
|
* Move files to subdirectories (#6599)Vitaliy2017-11-08
* Move files around