summaryrefslogtreecommitdiffstats
path: root/src/Generating/ComposableGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Generating/ComposableGenerator.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp
index 5dd54a497..7c891f5fa 100644
--- a/src/Generating/ComposableGenerator.cpp
+++ b/src/Generating/ComposableGenerator.cpp
@@ -27,6 +27,7 @@
#include "Noise3DGenerator.h"
#include "Ravines.h"
#include "RoughRavines.h"
+#include "SinglePieceStructuresGen.h"
#include "VillageGen.h"
#include "PieceStructuresGen.h"
@@ -217,6 +218,7 @@ void cComposableGenerator::InitializeGeneratorDefaults(cIniFile & a_IniFile, eDi
"Mineshafts, "
"Trees, "
"Villages, "
+ "SinglePieceStructures: JungleTemple|WitchHut|DesertPyramid|DesertWell, "
"TallGrass, "
"SprinkleFoliage, "
"Ice, "
@@ -606,6 +608,20 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
GridSize, MaxOffset
)));
}
+ else if (NoCaseCompare(finisher, "SinglePieceStructures") == 0)
+ {
+ if (split.size() < 2)
+ {
+ LOGWARNING("The SinglePieceStructures generator needs the structures to use. Example: \"SinglePieceStructures: DesertPyramid\".");
+ continue;
+ }
+
+ auto Gen = std::make_shared<cSinglePieceStructuresGen>(m_Seed);
+ if (Gen->Initialize(split[1], seaLevel, m_BiomeGen, m_CompositedHeightCache))
+ {
+ m_FinishGens.push_back(Gen);
+ }
+ }
else if (NoCaseCompare(finisher, "SoulsandRims") == 0)
{
m_FinishGens.push_back(cFinishGenPtr(new cFinishGenSoulsandRims(m_Seed)));