1
0

Changed cStructGenOreNests to take a list of ores + the block to replace.

This commit is contained in:
STRWarrior
2014-08-10 11:40:33 +02:00
parent 5eb5411f1e
commit ecfae28606
3 changed files with 83 additions and 53 deletions

View File

@@ -76,11 +76,29 @@ class cStructGenOreNests :
public cFinishGen
{
public:
cStructGenOreNests(int a_Seed) : m_Noise(a_Seed), m_Seed(a_Seed) {}
struct OreInfo
{
BLOCKTYPE BlockType; // The type of the nest.
int MaxHeight; // The highest possible a nest can occur
int NumNests; // How many nests per chunk
int NestSize; // The amount of blocks a nest can have.
};
typedef std::vector<OreInfo> OreList;
cStructGenOreNests(int a_Seed, OreList a_OreList, BLOCKTYPE a_ToReplace) :
m_Noise(a_Seed),
m_Seed(a_Seed),
m_OreList(a_OreList),
m_ToReplace(a_ToReplace)
{}
protected:
cNoise m_Noise;
int m_Seed;
cNoise m_Noise;
int m_Seed;
OreList m_OreList; // A list of possible ores.
BLOCKTYPE m_ToReplace;
// cFinishGen override:
virtual void GenFinish(cChunkDesc & a_ChunkDesc) override;