diff options
author | Mattes D <github@xoft.cz> | 2014-05-31 19:11:13 +0200 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2014-05-31 19:11:13 +0200 |
commit | 6de45037c774f5fc748a4520b6f2afacdca94661 (patch) | |
tree | dc5908fdb33d679c05f10aa562ccbb107e7f3518 /src/Generating/ComposableGenerator.cpp | |
parent | Merge pull request #951 from worktycho/chunksparsing/structs (diff) | |
parent | Updated PlainsVillage prefabs. (diff) | |
download | cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.gz cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.bz2 cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.lz cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.xz cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.tar.zst cuberite-6de45037c774f5fc748a4520b6f2afacdca94661.zip |
Diffstat (limited to 'src/Generating/ComposableGenerator.cpp')
-rw-r--r-- | src/Generating/ComposableGenerator.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 2e886336f..4dd626ed4 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,15 @@ 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", 384); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "VillageMaxDepth", 2); + int MaxSize = a_IniFile.GetValueSetI("Generator", "VillageMaxSize", 128); + int MinDensity = a_IniFile.GetValueSetI("Generator", "VillageMinDensity", 50); + int MaxDensity = a_IniFile.GetValueSetI("Generator", "VillageMaxDensity", 80); + m_FinishGens.push_back(new cVillageGen(Seed, GridSize, MaxDepth, MaxSize, MinDensity, MaxDensity, *m_BiomeGen, *m_HeightGen)); + } else if (NoCaseCompare(*itr, "WaterLakes") == 0) { int Probability = a_IniFile.GetValueSetI("Generator", "WaterLakesProbability", 25); |