summaryrefslogtreecommitdiff
path: root/src/dungeongen.h
diff options
context:
space:
mode:
authorparamat <mat.gregory@virginmedia.com>2016-06-12 03:11:26 +0100
committerparamat <mat.gregory@virginmedia.com>2016-06-17 04:42:42 +0100
commit04fb10914c0d03ee77dafe610f336f23c58949ab (patch)
tree7eee0d7ddc799a2bcae919b3618d5700eca7dace /src/dungeongen.h
parent39a9e9874ee739aea91acf36c6f81fc38bce7363 (diff)
downloadminetest-04fb10914c0d03ee77dafe610f336f23c58949ab.tar.gz
minetest-04fb10914c0d03ee77dafe610f336f23c58949ab.tar.bz2
minetest-04fb10914c0d03ee77dafe610f336f23c58949ab.zip
Dungeons: Generalise use, add capabilities, various modifications
- Generalise node names to c_wall and c_alt_wall - Remove 'mossratio' and instead disable alt_wall loop if c_alt_wall == CONTENT_IGNORE - Use one generalised 3D noise for alternative wall nodes and in mgv6 create moss distribution similar to the previous - Rename rarity noise to density noise and enable the option of multiple dungeons per chunk determined by the value. Recreate previous distribution - Add parameters for min and max rooms per dungeon - Add dungeon y limits - Integrate river water properly Generalisation is needed now that we have sandstone and desert stone dungeons by default and can choose any node for alternative structure. The current code is based around cobble dungeons with mossycobble alternative nodes, the 2 noises controlling the alternative nodes are based on wetness. Enabling multiple dungeons per chunk with definable number of rooms allows the option of very dense and complex underground structures that could interconnect to create megastructures. Y limits are added to be consistent with other mapgen elements, and enable locaton of dungeon or megastructure realms as part of our 'stacked realms' philosophy.
Diffstat (limited to 'src/dungeongen.h')
-rw-r--r--src/dungeongen.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/dungeongen.h b/src/dungeongen.h
index 898627483..30786b9f3 100644
--- a/src/dungeongen.h
+++ b/src/dungeongen.h
@@ -43,19 +43,21 @@ struct DungeonParams {
content_t c_water;
content_t c_river_water;
- content_t c_cobble;
- content_t c_moss;
+ content_t c_wall;
+ content_t c_alt_wall;
content_t c_stair;
- GenNotifyType notifytype;
bool diagonal_dirs;
- float mossratio;
v3s16 holesize;
v3s16 roomsize;
+ u16 rooms_min;
+ u16 rooms_max;
+ s16 y_min;
+ s16 y_max;
+ GenNotifyType notifytype;
- NoiseParams np_rarity;
- NoiseParams np_wetness;
NoiseParams np_density;
+ NoiseParams np_alt_wall;
};
class DungeonGen {
@@ -99,8 +101,7 @@ public:
}
};
-extern NoiseParams nparams_dungeon_rarity;
-extern NoiseParams nparams_dungeon_wetness;
extern NoiseParams nparams_dungeon_density;
+extern NoiseParams nparams_dungeon_alt_wall;
#endif