summaryrefslogtreecommitdiffstats
path: root/src/Generating/ComposableGenerator.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-08-27 13:53:02 +0200
committerMattes D <github@xoft.cz>2014-08-27 13:53:02 +0200
commit4a907c9efa9cc2bb6da95686b56ed8d7709613f2 (patch)
tree40d7d6ef18bad61b9c258e9ad8c9f1f57964489c /src/Generating/ComposableGenerator.cpp
parentMerge pull request #1346 from mc-server/AnvilStatsHeights (diff)
parentDungeonRooms: Added a height probability distribution function. (diff)
downloadcuberite-4a907c9efa9cc2bb6da95686b56ed8d7709613f2.tar
cuberite-4a907c9efa9cc2bb6da95686b56ed8d7709613f2.tar.gz
cuberite-4a907c9efa9cc2bb6da95686b56ed8d7709613f2.tar.bz2
cuberite-4a907c9efa9cc2bb6da95686b56ed8d7709613f2.tar.lz
cuberite-4a907c9efa9cc2bb6da95686b56ed8d7709613f2.tar.xz
cuberite-4a907c9efa9cc2bb6da95686b56ed8d7709613f2.tar.zst
cuberite-4a907c9efa9cc2bb6da95686b56ed8d7709613f2.zip
Diffstat (limited to 'src/Generating/ComposableGenerator.cpp')
-rw-r--r--src/Generating/ComposableGenerator.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp
index 2f575fe27..6f4007d24 100644
--- a/src/Generating/ComposableGenerator.cpp
+++ b/src/Generating/ComposableGenerator.cpp
@@ -19,6 +19,7 @@
#include "Caves.h"
#include "DistortedHeightmap.h"
+#include "DungeonRoomsFinisher.h"
#include "EndGen.h"
#include "MineShafts.h"
#include "NetherFortGen.h"
@@ -343,6 +344,14 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
float Threshold = (float)a_IniFile.GetValueSetF("Generator", "DualRidgeCavesThreshold", 0.3);
m_FinishGens.push_back(new cStructGenDualRidgeCaves(Seed, Threshold));
}
+ else if (NoCaseCompare(*itr, "DungeonRooms") == 0)
+ {
+ int GridSize = a_IniFile.GetValueSetI("Generator", "DungeonRoomsGridSize", 48);
+ int MaxSize = a_IniFile.GetValueSetI("Generator", "DungeonRoomsMaxSize", 7);
+ int MinSize = a_IniFile.GetValueSetI("Generator", "DungeonRoomsMinSize", 5);
+ AString HeightDistrib = a_IniFile.GetValueSet ("Generator", "DungeonRoomsHeightDistrib", "0, 0; 10, 10; 11, 500; 40, 500; 60, 40; 90, 1");
+ m_FinishGens.push_back(new cDungeonRoomsFinisher(*m_HeightGen, Seed, GridSize, MaxSize, MinSize, HeightDistrib));
+ }
else if (NoCaseCompare(*itr, "Ice") == 0)
{
m_FinishGens.push_back(new cFinishGenIce);