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
This commit is contained in:
@@ -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<cFinishGenSprinkleFoliage>(Seed, MaxCactusHeight, MaxSugarcaneHeight));
|
||||
}
|
||||
else if (NoCaseCompare(finisher, "TallGrass") == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user