summaryrefslogtreecommitdiff
path: root/src/mapgen/dungeongen.h
diff options
context:
space:
mode:
authorParamat <paramat@users.noreply.github.com>2019-06-01 20:50:43 +0100
committerGitHub <noreply@github.com>2019-06-01 20:50:43 +0100
commit7379aa74cf98c7e4c7aa5325ef1531d412a0abac (patch)
tree45a3c608dce1fd03182f4f84f1968439dbfa4dbc /src/mapgen/dungeongen.h
parenta1459a9eac4eeb35a6c578a8b8f96393f87ed53d (diff)
downloadminetest-7379aa74cf98c7e4c7aa5325ef1531d412a0abac.tar.gz
minetest-7379aa74cf98c7e4c7aa5325ef1531d412a0abac.tar.bz2
minetest-7379aa74cf98c7e4c7aa5325ef1531d412a0abac.zip
Dungeons: Settable density noise, move number calculation to mapgens (#8473)
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.
Diffstat (limited to 'src/mapgen/dungeongen.h')
-rw-r--r--src/mapgen/dungeongen.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mapgen/dungeongen.h b/src/mapgen/dungeongen.h
index 7d04a6254..2c20446fd 100644
--- a/src/mapgen/dungeongen.h
+++ b/src/mapgen/dungeongen.h
@@ -58,7 +58,6 @@ struct DungeonParams {
u16 rooms_max;
GenNotifyType notifytype;
- NoiseParams np_density;
NoiseParams np_alt_wall;
};
@@ -83,7 +82,7 @@ public:
GenerateNotifier *gennotify, DungeonParams *dparams);
void generate(MMVManip *vm, u32 bseed,
- v3s16 full_node_min, v3s16 full_node_max);
+ v3s16 full_node_min, v3s16 full_node_max, u16 num_dungeons);
void makeDungeon(v3s16 start_padding);
void makeRoom(v3s16 roomsize, v3s16 roomplace);