1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-20 03:35:18 +02:00

Mapgen: Deduplicate common constructor code

This commit is contained in:
kwolekr
2016-05-22 02:17:19 -04:00
parent 0df5c01a8c
commit 0810901766
12 changed files with 128 additions and 221 deletions

View File

@@ -50,26 +50,23 @@ struct MapgenV5Params : public MapgenSpecificParams {
class MapgenV5 : public MapgenBasic {
public:
u32 spflags;
Noise *noise_factor;
Noise *noise_height;
Noise *noise_ground;
content_t c_lava_source;
content_t c_ice;
content_t c_cobble;
content_t c_stair_cobble;
content_t c_mossycobble;
content_t c_sandstonebrick;
content_t c_stair_sandstonebrick;
MapgenV5(int mapgenid, MapgenParams *params, EmergeManager *emerge);
~MapgenV5();
virtual void makeChunk(BlockMakeData *data);
int getSpawnLevelAtPoint(v2s16 p);
int generateBaseTerrain();
private:
Noise *noise_factor;
Noise *noise_height;
Noise *noise_ground;
content_t c_cobble;
content_t c_stair_cobble;
content_t c_mossycobble;
content_t c_sandstonebrick;
content_t c_stair_sandstonebrick;
};