aboutsummaryrefslogtreecommitdiff
path: root/src/mapgen/dungeongen.cpp
AgeCommit message (Collapse)Author
2022-04-08Spacing fixesShadowNinja
2019-09-08Dungeons: Remove non-functional 'projecting dungeons' setting (#8897)Paramat
2019-07-16Dungeons: Make multiple large rooms possible (#8678)Paramat
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.
2019-07-09Move more dungeon parameter selection to mapgens (#8653)Paramat
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.
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-04-07Optimize random turns in dungeongen (#8129)Jozef Behran
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.
2019-03-26Dungeons: Do not remove nodes that have 'is_ground_content = false' (#8423)Paramat
Like randomwalk caves, preserve nodes that have 'is_ground_content = false', to avoid dungeons that generate out beyond the edge of a mapchunk destroying nodes added by mods in 'register_on_generated()'. Issue discovered by, and original PR by, argyle77.
2019-01-22Fix warnings about dungeongen.cpp memcpy() and unused variable in ↵Paramat
MapBlock::deSerializeNetworkSpecific() (#8122) * Fix warning about dungeongen.cpp memcpy() * Fix unused variable in MapBlock::deSerializeNetworkSpecific() * Fix unused variable a simpler way
2018-05-20Dungeons: Fix duplication of y limit parameters (#7359)Paramat
2018-04-25Dungeons: Mostly fix missing stair nodesParamat
2018-04-02Fix many issues reported by clang-tidy (#7189)Loïc Blot
* Fix many issues reported by clang-tidy We have many issues in code related to some performance to float <-> double. Clang-tidy reported it in performance-type-promotion-in-math-fn I fixed many of them. It's not ready for a promote to blocking Also fix some value which should be const-ref
2018-02-13Dungeons: Avoid generation in multiple liquid nodes and 'airlike'paramat
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.
2018-02-10Node definition manager refactor (#7016)Dániel Juhász
* Rename IWritableNodeDefManager to NodeDefManager * Make INodeDefManager functions const * Use "const *NodeDefManager" instead of "*INodeDefManager" * Remove unused INodeDefManager class * Merge NodeDefManager and CNodeDefManager * Document NodeDefManager
2018-01-15Mapgen folder: Update and improve copyright information of filesparamat
2017-11-08Move files to subdirectories (#6599)Vitaliy
* Move files around