diff options
Diffstat (limited to 'src/mapgen/mapgen_carpathian.cpp')
-rw-r--r-- | src/mapgen/mapgen_carpathian.cpp | 73 |
1 files changed, 45 insertions, 28 deletions
diff --git a/src/mapgen/mapgen_carpathian.cpp b/src/mapgen/mapgen_carpathian.cpp index 12ce07da4..0dc1d33be 100644 --- a/src/mapgen/mapgen_carpathian.cpp +++ b/src/mapgen/mapgen_carpathian.cpp @@ -58,15 +58,19 @@ MapgenCarpathian::MapgenCarpathian(MapgenCarpathianParams *params, EmergeManager river_depth = params->river_depth; valley_width = params->valley_width; - spflags = params->spflags; - cave_width = params->cave_width; - large_cave_depth = params->large_cave_depth; - lava_depth = params->lava_depth; - cavern_limit = params->cavern_limit; - cavern_taper = params->cavern_taper; - cavern_threshold = params->cavern_threshold; - dungeon_ymin = params->dungeon_ymin; - dungeon_ymax = params->dungeon_ymax; + spflags = params->spflags; + cave_width = params->cave_width; + large_cave_depth = params->large_cave_depth; + small_cave_num_min = params->small_cave_num_min; + small_cave_num_max = params->small_cave_num_max; + large_cave_num_min = params->large_cave_num_min; + large_cave_num_max = params->large_cave_num_max; + large_cave_flooded = params->large_cave_flooded; + cavern_limit = params->cavern_limit; + cavern_taper = params->cavern_taper; + cavern_threshold = params->cavern_threshold; + dungeon_ymin = params->dungeon_ymin; + dungeon_ymax = params->dungeon_ymax; grad_wl = 1 - water_level; @@ -148,14 +152,18 @@ void MapgenCarpathianParams::readParams(const Settings *settings) settings->getFloatNoEx("mgcarpathian_river_depth", river_depth); settings->getFloatNoEx("mgcarpathian_valley_width", valley_width); - settings->getFloatNoEx("mgcarpathian_cave_width", cave_width); - settings->getS16NoEx("mgcarpathian_large_cave_depth", large_cave_depth); - settings->getS16NoEx("mgcarpathian_lava_depth", lava_depth); - settings->getS16NoEx("mgcarpathian_cavern_limit", cavern_limit); - settings->getS16NoEx("mgcarpathian_cavern_taper", cavern_taper); - settings->getFloatNoEx("mgcarpathian_cavern_threshold", cavern_threshold); - settings->getS16NoEx("mgcarpathian_dungeon_ymin", dungeon_ymin); - settings->getS16NoEx("mgcarpathian_dungeon_ymax", dungeon_ymax); + settings->getFloatNoEx("mgcarpathian_cave_width", cave_width); + settings->getS16NoEx("mgcarpathian_large_cave_depth", large_cave_depth); + settings->getU16NoEx("mgcarpathian_small_cave_num_min", small_cave_num_min); + settings->getU16NoEx("mgcarpathian_small_cave_num_max", small_cave_num_max); + settings->getU16NoEx("mgcarpathian_large_cave_num_min", large_cave_num_min); + settings->getU16NoEx("mgcarpathian_large_cave_num_max", large_cave_num_max); + settings->getFloatNoEx("mgcarpathian_large_cave_flooded", large_cave_flooded); + settings->getS16NoEx("mgcarpathian_cavern_limit", cavern_limit); + settings->getS16NoEx("mgcarpathian_cavern_taper", cavern_taper); + settings->getFloatNoEx("mgcarpathian_cavern_threshold", cavern_threshold); + settings->getS16NoEx("mgcarpathian_dungeon_ymin", dungeon_ymin); + settings->getS16NoEx("mgcarpathian_dungeon_ymax", dungeon_ymax); settings->getNoiseParams("mgcarpathian_np_filler_depth", np_filler_depth); settings->getNoiseParams("mgcarpathian_np_height1", np_height1); @@ -179,21 +187,25 @@ void MapgenCarpathianParams::readParams(const Settings *settings) void MapgenCarpathianParams::writeParams(Settings *settings) const { - settings->setFlagStr("mgcarpathian_spflags", spflags, flagdesc_mapgen_carpathian, U32_MAX); + settings->setFlagStr("mgcarpathian_spflags", spflags, flagdesc_mapgen_carpathian); settings->setFloat("mgcarpathian_base_level", base_level); settings->setFloat("mgcarpathian_river_width", river_width); settings->setFloat("mgcarpathian_river_depth", river_depth); settings->setFloat("mgcarpathian_valley_width", valley_width); - settings->setFloat("mgcarpathian_cave_width", cave_width); - settings->setS16("mgcarpathian_large_cave_depth", large_cave_depth); - settings->setS16("mgcarpathian_lava_depth", lava_depth); - settings->setS16("mgcarpathian_cavern_limit", cavern_limit); - settings->setS16("mgcarpathian_cavern_taper", cavern_taper); - settings->setFloat("mgcarpathian_cavern_threshold", cavern_threshold); - settings->setS16("mgcarpathian_dungeon_ymin", dungeon_ymin); - settings->setS16("mgcarpathian_dungeon_ymax", dungeon_ymax); + settings->setFloat("mgcarpathian_cave_width", cave_width); + settings->setS16("mgcarpathian_large_cave_depth", large_cave_depth); + settings->setU16("mgcarpathian_small_cave_num_min", small_cave_num_min); + settings->setU16("mgcarpathian_small_cave_num_max", small_cave_num_max); + settings->setU16("mgcarpathian_large_cave_num_min", large_cave_num_min); + settings->setU16("mgcarpathian_large_cave_num_max", large_cave_num_max); + settings->setFloat("mgcarpathian_large_cave_flooded", large_cave_flooded); + settings->setS16("mgcarpathian_cavern_limit", cavern_limit); + settings->setS16("mgcarpathian_cavern_taper", cavern_taper); + settings->setFloat("mgcarpathian_cavern_threshold", cavern_threshold); + settings->setS16("mgcarpathian_dungeon_ymin", dungeon_ymin); + settings->setS16("mgcarpathian_dungeon_ymax", dungeon_ymax); settings->setNoiseParams("mgcarpathian_np_filler_depth", np_filler_depth); settings->setNoiseParams("mgcarpathian_np_height1", np_height1); @@ -215,6 +227,12 @@ void MapgenCarpathianParams::writeParams(Settings *settings) const } +void MapgenCarpathianParams::setDefaultSettings(Settings *settings) +{ + settings->setDefault("mgcarpathian_spflags", flagdesc_mapgen_carpathian, + MGCARPATHIAN_CAVERNS); +} + //////////////////////////////////////////////////////////////////////////////// @@ -301,8 +319,7 @@ void MapgenCarpathian::makeChunk(BlockMakeData *data) m_emerge->oremgr->placeAllOres(this, blockseed, node_min, node_max); // Generate dungeons - if ((flags & MG_DUNGEONS) && full_node_min.Y >= dungeon_ymin && - full_node_max.Y <= dungeon_ymax) + if (flags & MG_DUNGEONS) generateDungeons(stone_surface_max_y); // Generate the registered decorations |