mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Rewrite generate notification mechanism
Add support for notify-on-decoration Clean up mapgen constructors Clean up mapgen.cpp code style somewhat Remove trailing whitespace from some files
This commit is contained in:
parent
2b119e1e19
commit
5062b99cb0
19 changed files with 436 additions and 329 deletions
|
@ -42,10 +42,10 @@ struct MapgenV7Params : public MapgenSpecificParams {
|
|||
NoiseParams np_ridge_uwater;
|
||||
NoiseParams np_mountain;
|
||||
NoiseParams np_ridge;
|
||||
|
||||
|
||||
MapgenV7Params();
|
||||
~MapgenV7Params() {}
|
||||
|
||||
|
||||
void readParams(Settings *settings);
|
||||
void writeParams(Settings *settings);
|
||||
};
|
||||
|
@ -57,7 +57,6 @@ public:
|
|||
|
||||
int ystride;
|
||||
int zstride;
|
||||
u32 flags;
|
||||
u32 spflags;
|
||||
|
||||
u32 blockseed;
|
||||
|
@ -65,9 +64,9 @@ public:
|
|||
v3s16 node_max;
|
||||
v3s16 full_node_min;
|
||||
v3s16 full_node_max;
|
||||
|
||||
|
||||
s16 *ridge_heightmap;
|
||||
|
||||
|
||||
Noise *noise_terrain_base;
|
||||
Noise *noise_terrain_alt;
|
||||
Noise *noise_terrain_persist;
|
||||
|
@ -77,10 +76,10 @@ public:
|
|||
Noise *noise_ridge_uwater;
|
||||
Noise *noise_mountain;
|
||||
Noise *noise_ridge;
|
||||
|
||||
|
||||
Noise *noise_heat;
|
||||
Noise *noise_humidity;
|
||||
|
||||
|
||||
content_t c_stone;
|
||||
content_t c_dirt;
|
||||
content_t c_dirt_with_grass;
|
||||
|
@ -95,7 +94,7 @@ public:
|
|||
|
||||
MapgenV7(int mapgenid, MapgenParams *params, EmergeManager *emerge);
|
||||
~MapgenV7();
|
||||
|
||||
|
||||
virtual void makeChunk(BlockMakeData *data);
|
||||
int getGroundLevelAtPoint(v2s16 p);
|
||||
Biome *getBiomeAtPoint(v3s16 p);
|
||||
|
@ -104,19 +103,19 @@ public:
|
|||
float baseTerrainLevelFromMap(int index);
|
||||
bool getMountainTerrainAtPoint(int x, int y, int z);
|
||||
bool getMountainTerrainFromMap(int idx_xyz, int idx_xz, int y);
|
||||
|
||||
|
||||
void calculateNoise();
|
||||
|
||||
|
||||
virtual int generateTerrain();
|
||||
int generateBaseTerrain();
|
||||
void generateMountainTerrain();
|
||||
void generateRidgeTerrain();
|
||||
|
||||
|
||||
void generateBiomes();
|
||||
void dustTopNodes();
|
||||
|
||||
|
||||
//void addTopNodes();
|
||||
|
||||
|
||||
void generateCaves(int max_stone_y);
|
||||
};
|
||||
|
||||
|
@ -124,7 +123,7 @@ struct MapgenFactoryV7 : public MapgenFactory {
|
|||
Mapgen *createMapgen(int mgid, MapgenParams *params, EmergeManager *emerge) {
|
||||
return new MapgenV7(mgid, params, emerge);
|
||||
};
|
||||
|
||||
|
||||
MapgenSpecificParams *createMapgenParams() {
|
||||
return new MapgenV7Params();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue