diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-04 14:14:38 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-06-04 14:14:38 +0200 |
commit | 86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791 (patch) | |
tree | 1b5c702a9e9da9115e64c317bdad5aba3544d4a1 /src/Generating/ComposableGenerator.cpp | |
parent | Implemented bed homes (diff) | |
parent | Merge pull request #1059 from mc-server/coverity_fixes (diff) | |
download | cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar.gz cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar.bz2 cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar.lz cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar.xz cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.tar.zst cuberite-86e5273cd17be8b8f1ae8a9b0dc2d212cb9b2791.zip |
Diffstat (limited to 'src/Generating/ComposableGenerator.cpp')
-rw-r--r-- | src/Generating/ComposableGenerator.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index 03ed0291f..37a6b829a 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -25,6 +25,8 @@ #include "Noise3DGenerator.h" #include "POCPieceGenerator.h" #include "Ravines.h" +#include "UnderwaterBaseGen.h" +#include "VillageGen.h" @@ -32,6 +34,7 @@ /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // cTerrainCompositionGen: + cTerrainCompositionGen * cTerrainCompositionGen::CreateCompositionGen(cIniFile & a_IniFile, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen, int a_Seed) { AString CompoGenName = a_IniFile.GetValueSet("Generator", "CompositionGen", ""); @@ -390,6 +393,22 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) { m_FinishGens.push_back(new cStructGenTrees(Seed, m_BiomeGen, m_HeightGen, m_CompositionGen)); } + else if (NoCaseCompare(*itr, "UnderwaterBases") == 0) + { + int GridSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseGridSize", 1024); + int MaxDepth = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxDepth", 7); + int MaxSize = a_IniFile.GetValueSetI("Generator", "UnderwaterBaseMaxSize", 128); + m_FinishGens.push_back(new cUnderwaterBaseGen(Seed, GridSize, MaxDepth, MaxSize, *m_BiomeGen)); + } + 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); |