| Commit message (Collapse) | Author | Age |
| |
|
|
|
|
|
|
|
|
|
| |
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 '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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
| |
MapBlock::deSerializeNetworkSpecific() (#8122)
* Fix warning about dungeongen.cpp memcpy()
* Fix unused variable in MapBlock::deSerializeNetworkSpecific()
* Fix unused variable a simpler way
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
* Rename IWritableNodeDefManager to NodeDefManager
* Make INodeDefManager functions const
* Use "const *NodeDefManager" instead of "*INodeDefManager"
* Remove unused INodeDefManager class
* Merge NodeDefManager and CNodeDefManager
* Document NodeDefManager
|
| |
|
|
* Move files around
|