summaryrefslogtreecommitdiffstats
path: root/src/Generating/ComposableGenerator.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-15 00:14:06 +0200
committermadmaxoft <github@xoft.cz>2014-05-15 00:14:06 +0200
commitf5fdbdaf29738f51fdb8a4a0e5aa78631c6540cf (patch)
tree233554d2d2267eba3484113698c0ebef37f9610a /src/Generating/ComposableGenerator.cpp
parentcPrefab can be constructed in code. (diff)
downloadcuberite-f5fdbdaf29738f51fdb8a4a0e5aa78631c6540cf.tar
cuberite-f5fdbdaf29738f51fdb8a4a0e5aa78631c6540cf.tar.gz
cuberite-f5fdbdaf29738f51fdb8a4a0e5aa78631c6540cf.tar.bz2
cuberite-f5fdbdaf29738f51fdb8a4a0e5aa78631c6540cf.tar.lz
cuberite-f5fdbdaf29738f51fdb8a4a0e5aa78631c6540cf.tar.xz
cuberite-f5fdbdaf29738f51fdb8a4a0e5aa78631c6540cf.tar.zst
cuberite-f5fdbdaf29738f51fdb8a4a0e5aa78631c6540cf.zip
Diffstat (limited to '')
-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 2e886336f..1bb836684 100644
--- a/src/Generating/ComposableGenerator.cpp
+++ b/src/Generating/ComposableGenerator.cpp
@@ -25,6 +25,7 @@
#include "Noise3DGenerator.h"
#include "POCPieceGenerator.h"
#include "Ravines.h"
+#include "VillageGen.h"
@@ -32,6 +33,7 @@
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// cTerrainCompositionGen:
+
cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile & a_IniFile, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen, int a_Seed)
{
AString CompoGenName = a_IniFile.GetValueSet("Generator", "CompositionGen", "");
@@ -404,6 +406,13 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
{
m_FinishGens.push_back(new cStructGenTrees(Seed, m_BiomeGen, m_HeightGen, m_CompositionGen));
}
+ else if (NoCaseCompare(*itr, "Villages") == 0)
+ {
+ int GridSize = a_IniFile.GetValueSetI("Generator", "VillageGridSize", 256);
+ int MaxDepth = a_IniFile.GetValueSetI("Generator", "VillageMaxDepth", 7);
+ int MaxSize = a_IniFile.GetValueSetI("Generator", "VillageMaxSize", 128);
+ m_FinishGens.push_back(new cVillageGen(Seed, GridSize, MaxDepth, MaxSize, *m_BiomeGen, *m_HeightGen));
+ }
else if (NoCaseCompare(*itr, "WaterLakes") == 0)
{
int Probability = a_IniFile.GetValueSetI("Generator", "WaterLakesProbability", 25);