From fbf5cf7aa61a48f916afd81ac7e282eac8d50e6f Mon Sep 17 00:00:00 2001 From: Cocosushi6 Date: Thu, 3 May 2018 20:25:08 +0200 Subject: Generate cacti and sugarcane with different heights (#4137) When generating foliage, create cacti with height in the interval [1; MaxCactusHeight] and sugarcane with height in [1; MaxSugarcaneHeight] (with MaxCactusHeight and MaxSugarcaneHeight declared in world.ini) Fixes #4135 --- src/Generating/ComposableGenerator.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index e964bca46..c73ecf6cc 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -525,7 +525,9 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(finisher, "SprinkleFoliage") == 0) { - m_FinishGens.push_back(cFinishGenPtr(new cFinishGenSprinkleFoliage(Seed))); + int MaxCactusHeight = a_IniFile.GetValueI("Plants", "MaxCactusHeight", 3); + int MaxSugarcaneHeight = a_IniFile.GetValueI("Plants", "MaxSugarcaneHeight", 3); + m_FinishGens.push_back(std::make_shared(Seed, MaxCactusHeight, MaxSugarcaneHeight)); } else if (NoCaseCompare(finisher, "TallGrass") == 0) { -- cgit v1.2.3