Changed cStructGenOreNests to take a list of ores + the block to replace.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user