From bf1aa7993202c2f57de88b068d999d262f1874f6 Mon Sep 17 00:00:00 2001 From: STRWarrior Date: Mon, 28 Jul 2014 14:23:29 +0200 Subject: Renamed cFinishGenSingleBiomeSingleTopBlock to cFinishGenSingleTopBlock Now accepts a vector of biomes and a vector of allowed blocks. --- src/Generating/ComposableGenerator.cpp | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'src/Generating/ComposableGenerator.cpp') diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp index ab6accee7..ed1e7f6c1 100644 --- a/src/Generating/ComposableGenerator.cpp +++ b/src/Generating/ComposableGenerator.cpp @@ -323,7 +323,24 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "DeadBushes") == 0) { - m_FinishGens.push_back(new cFinishGenSingleBiomeSingleTopBlock(Seed, E_BLOCK_DEAD_BUSH, biDesert, 2, E_BLOCK_SAND, E_BLOCK_SAND)); + // A list with all the allowed biomes. + cFinishGenSingleTopBlock::BiomeList AllowedBiomes; + AllowedBiomes.push_back(biDesert); + AllowedBiomes.push_back(biDesertHills); + AllowedBiomes.push_back(biDesertM); + AllowedBiomes.push_back(biMesa); + AllowedBiomes.push_back(biMesaBryce); + AllowedBiomes.push_back(biMesaPlateauF); + AllowedBiomes.push_back(biMesaPlateauFM); + AllowedBiomes.push_back(biMesaPlateauM); + + // A list with all the allowed blocks that can be below the lilypad. + cFinishGenSingleTopBlock::BlockList AllowedBlocks; + AllowedBlocks.push_back(E_BLOCK_SAND); + AllowedBlocks.push_back(E_BLOCK_HARDENED_CLAY); + AllowedBlocks.push_back(E_BLOCK_STAINED_CLAY); + + m_FinishGens.push_back(new cFinishGenSingleTopBlock(Seed, E_BLOCK_DEAD_BUSH, AllowedBiomes, 2, AllowedBlocks)); } else if (NoCaseCompare(*itr, "DirectOverhangs") == 0) { @@ -370,7 +387,17 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile) } else if (NoCaseCompare(*itr, "Lilypads") == 0) { - m_FinishGens.push_back(new cFinishGenSingleBiomeSingleTopBlock(Seed, E_BLOCK_LILY_PAD, biSwampland, 4, E_BLOCK_WATER, E_BLOCK_STATIONARY_WATER)); + // A list with all the allowed biomes. + cFinishGenSingleTopBlock::BiomeList AllowedBiomes; + AllowedBiomes.push_back(biSwampland); + AllowedBiomes.push_back(biSwamplandM); + + // A list with all the allowed blocks that can be below the lilypad. + cFinishGenSingleTopBlock::BlockList AllowedBlocks; + AllowedBlocks.push_back(E_BLOCK_WATER); + AllowedBlocks.push_back(E_BLOCK_STATIONARY_WATER); + + m_FinishGens.push_back(new cFinishGenSingleTopBlock(Seed, E_BLOCK_LILY_PAD, AllowedBiomes, 4, AllowedBlocks)); } else if (NoCaseCompare(*itr, "NetherClumpFoliage") == 0) { -- cgit v1.2.3