diff options
Diffstat (limited to 'src/mapgen/mapgen.h')
-rw-r--r-- | src/mapgen/mapgen.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/mapgen/mapgen.h b/src/mapgen/mapgen.h index 0ac26d538..dc325c791 100644 --- a/src/mapgen/mapgen.h +++ b/src/mapgen/mapgen.h @@ -30,10 +30,10 @@ with this program; if not, write to the Free Software Foundation, Inc., #define MAPGEN_DEFAULT_NAME "v7" /////////////////// Mapgen flags -#define MG_TREES 0x01 // Deprecated. Moved into mgv6 flags +#define MG_TREES 0x01 // Obsolete. Moved into mgv6 flags #define MG_CAVES 0x02 #define MG_DUNGEONS 0x04 -#define MG_FLAT 0x08 // Deprecated. Moved into mgv6 flags +#define MG_FLAT 0x08 // Obsolete. Moved into mgv6 flags #define MG_LIGHT 0x10 #define MG_DECORATIONS 0x20 #define MG_BIOMES 0x40 @@ -124,7 +124,9 @@ struct MapgenParams { u64 seed = 0; s16 water_level = 1; s16 mapgen_limit = MAX_MAP_GENERATION_LIMIT; - u32 flags = MG_CAVES | MG_LIGHT | MG_DECORATIONS | MG_BIOMES; + // Flags set in readParams + u32 flags = 0; + u32 spflags = 0; BiomeParams *bparams = nullptr; @@ -133,6 +135,8 @@ struct MapgenParams { virtual void readParams(const Settings *settings); virtual void writeParams(Settings *settings) const; + // Default settings for g_settings such as flags + virtual void setDefaultSettings(Settings *settings) {}; s32 getSpawnRangeMax(); @@ -214,6 +218,7 @@ public: EmergeManager *emerge); static MapgenParams *createMapgenParams(MapgenType mgtype); static void getMapgenNames(std::vector<const char *> *mgnames, bool include_hidden); + static void setDefaultSettings(Settings *settings); private: // isLiquidHorizontallyFlowable() is a helper function for updateLiquid() @@ -244,7 +249,7 @@ public: virtual void generateBiomes(); virtual void dustTopNodes(); virtual void generateCavesNoiseIntersection(s16 max_stone_y); - virtual void generateCavesRandomWalk(s16 max_stone_y, s16 large_cave_depth); + virtual void generateCavesRandomWalk(s16 max_stone_y, s16 large_cave_ymax); virtual bool generateCavernsNoise(s16 max_stone_y); virtual void generateDungeons(s16 max_stone_y); @@ -280,7 +285,12 @@ protected: float cavern_limit; float cavern_taper; float cavern_threshold; - // TODO 'lava_depth' is deprecated and should be removed. Cave liquids are - // now defined and located using biome definitions. - int lava_depth; + int small_cave_num_min; + int small_cave_num_max; + int large_cave_num_min; + int large_cave_num_max; + float large_cave_flooded; + s16 large_cave_depth; + s16 dungeon_ymin; + s16 dungeon_ymax; }; |