summaryrefslogtreecommitdiffstats
path: root/src/Generating/ComposableGenerator.cpp
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2015-06-21 13:08:34 +0200
committerworktycho <work.tycho@gmail.com>2015-06-21 13:08:34 +0200
commit0096327c4ff8f69755a0ca438fcd08171e68c5d7 (patch)
tree7400062806953c5fc1d8abd3ab9eaa74800d4872 /src/Generating/ComposableGenerator.cpp
parentMerge pull request #2255 from cuberite/LoadablePieces (diff)
parentAdded basic support for loading village prefabs from files. (diff)
downloadcuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar
cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.gz
cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.bz2
cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.lz
cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.xz
cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.zst
cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.zip
Diffstat (limited to 'src/Generating/ComposableGenerator.cpp')
-rw-r--r--src/Generating/ComposableGenerator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp
index f9a4d7609..2c74340be 100644
--- a/src/Generating/ComposableGenerator.cpp
+++ b/src/Generating/ComposableGenerator.cpp
@@ -618,7 +618,9 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
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(std::make_shared<cVillageGen>(Seed, GridSize, MaxOffset, MaxDepth, MaxSize, MinDensity, MaxDensity, m_BiomeGen, m_CompositedHeightCache));
+ AString PrefabList = a_IniFile.GetValueSet("Generator", "VillagePrefabs", "PlainsVillage, SandVillage");
+ auto Prefabs = StringSplitAndTrim(PrefabList, ",");
+ m_FinishGens.push_back(std::make_shared<cVillageGen>(Seed, GridSize, MaxOffset, MaxDepth, MaxSize, MinDensity, MaxDensity, m_BiomeGen, m_CompositedHeightCache, Prefabs));
}
else if (NoCaseCompare(*itr, "Vines") == 0)
{