diff --git a/biomes/level1.lua b/biomes/level1.lua index 6427a51..26a8ed2 100644 --- a/biomes/level1.lua +++ b/biomes/level1.lua @@ -11,8 +11,6 @@ local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fun local c_wet_flowstone = minetest.get_content_id("dfcaverns:wet_flowstone") local c_dry_flowstone = minetest.get_content_id("dfcaverns:dry_flowstone") -local subsea_level = (dfcaverns.config.ymax - dfcaverns.config.level1_min) * 0.3 + dfcaverns.config.level1_min - local c_sweet_pod = minetest.get_content_id("dfcaverns:sweet_pod_6") -- param2 = 0 local c_quarry_bush = minetest.get_content_id("dfcaverns:quarry_bush_5") -- param2 = 4 local c_plump_helmet = minetest.get_content_id("dfcaverns:plump_helmet_4") -- param2 = 0-3 @@ -22,6 +20,9 @@ local c_cave_wheat = minetest.get_content_id("dfcaverns:cave_wheat_8") -- param2 local c_dead_fungus = minetest.get_content_id("dfcaverns:dead_fungus") -- param2 = 0 local c_cavern_fungi = minetest.get_content_id("dfcaverns:cavern_fungi") -- param2 = 0 +local subsea_level = (dfcaverns.config.ymax - dfcaverns.config.level1_min) * 0.3 + dfcaverns.config.level1_min +local flooded_biomes = dfcaverns.config.flooded_biomes + local level_1_tower_cap_floor = function(area, data, ai, vi, bi, param2_data) if data[bi] ~= c_stone then return @@ -161,11 +162,17 @@ local level_1_underwater_floor = function(area, data, ai, vi, bi, param2_data) else data[bi] = c_dirt end - if data[vi] == c_air then - data[vi] = c_water - end - if data[ai] == c_air then - data[ai] = c_water + if flooded_biomes then + if data[vi] == c_air then + data[vi] = c_water + end + if data[ai] == c_air then + data[ai] = c_water + end + elseif math.random() < 0.01 then + if data[vi] == c_air then + data[vi] = c_water + end end end @@ -209,6 +216,12 @@ end ------------------------------------------------------------------------------------------- +local c_flood_fill +if flooded_biomes then + c_flood_fill = c_water +else + c_flood_fill = c_air +end minetest.register_biome({ name = "dfcaverns_level1_flooded_biome_lower", @@ -217,7 +230,7 @@ minetest.register_biome({ heat_point = 50, humidity_point = 100, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_floor_decor = level_1_underwater_floor, _subterrane_mitigate_lava = true, }) @@ -231,7 +244,7 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_1_moist_ceiling, _subterrane_floor_decor = level_1_wet_floor, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_mitigate_lava = true, }) @@ -298,7 +311,7 @@ minetest.register_biome({ heat_point = 20, humidity_point = 80, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_floor_decor = level_1_underwater_floor, _subterrane_mitigate_lava = true, }) @@ -325,7 +338,7 @@ minetest.register_biome({ heat_point = 80, humidity_point = 80, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_floor_decor = level_1_underwater_floor, _subterrane_mitigate_lava = true, }) diff --git a/biomes/level2.lua b/biomes/level2.lua index 7dfe901..efdf42d 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -18,7 +18,6 @@ local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fun local c_wet_flowstone = minetest.get_content_id("dfcaverns:wet_flowstone") local c_dry_flowstone = minetest.get_content_id("dfcaverns:dry_flowstone") - local c_sweet_pod = minetest.get_content_id("dfcaverns:sweet_pod_6") -- param2 = 0 local c_quarry_bush = minetest.get_content_id("dfcaverns:quarry_bush_5") -- param2 = 4 local c_plump_helmet = minetest.get_content_id("dfcaverns:plump_helmet_4") -- param2 = 0-3 @@ -29,7 +28,7 @@ local c_dead_fungus = minetest.get_content_id("dfcaverns:dead_fungus") -- param2 local c_cavern_fungi = minetest.get_content_id("dfcaverns:cavern_fungi") -- param2 = 0 local subsea_level = (dfcaverns.config.level1_min - dfcaverns.config.level2_min) * 0.3 + dfcaverns.config.level2_min - +local flooded_biomes = dfcaverns.config.flooded_biomes local level_2_tower_cap_floor = function(area, data, ai, vi, bi, param2_data) if data[bi] ~= c_stone then @@ -296,8 +295,19 @@ local level_2_underwater_floor = function(area, data, ai, vi, bi, param2_data) return end data[bi] = c_dirt - if data[vi] == c_air then data[vi] = c_water end - if data[ai] == c_air then data[ai] = c_water end + + if flooded_biomes then + if data[vi] == c_air then + data[vi] = c_water + end + if data[ai] == c_air then + data[ai] = c_water + end + elseif math.random() < 0.01 then + if data[vi] == c_air then + data[vi] = c_water + end + end end local level_2_cave_floor = function(area, data, ai, vi, bi, param2_data) @@ -339,6 +349,12 @@ end ------------------------------------------------------------------------------------------- +local c_flood_fill +if flooded_biomes then + c_flood_fill = c_water +else + c_flood_fill = c_air +end minetest.register_biome({ name = "dfcaverns_level2_flooded_biome_lower", @@ -347,7 +363,7 @@ minetest.register_biome({ heat_point = 50, humidity_point = 90, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_floor_decor = level_2_underwater_floor, _subterrane_mitigate_lava = false, }) @@ -361,7 +377,7 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_2_moist_ceiling, _subterrane_floor_decor = level_2_wet_floor, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_mitigate_lava = true, }) diff --git a/biomes/level3.lua b/biomes/level3.lua index 08e8955..68694f0 100644 --- a/biomes/level3.lua +++ b/biomes/level3.lua @@ -34,6 +34,7 @@ local c_dead_fungus = minetest.get_content_id("dfcaverns:dead_fungus") -- param2 local c_cavern_fungi = minetest.get_content_id("dfcaverns:cavern_fungi") -- param2 = 0 local subsea_level = (dfcaverns.config.level2_min - dfcaverns.config.level3_min) * 0.3 + dfcaverns.config.level3_min +local flooded_biomes = dfcaverns.config.flooded_biomes local level_3_moist_ceiling = function(area, data, ai, vi, bi, param2_data) if data[ai] ~= c_stone then @@ -128,8 +129,19 @@ local level_3_underwater_floor = function(area, data, ai, vi, bi, param2_data) return end data[bi] = c_dirt - if data[vi] == c_air then data[vi] = c_water end - if data[ai] == c_air then data[ai] = c_water end + + if flooded_biomes then + if data[vi] == c_air then + data[vi] = c_water + end + if data[ai] == c_air then + data[ai] = c_water + end + elseif math.random() < 0.01 then + if data[vi] == c_air then + data[vi] = c_water + end + end end local level_3_dry_ceiling = function(area, data, ai, vi, bi, param2_data) @@ -373,6 +385,12 @@ end ------------------------------------------------------------------------------------------- +local c_flood_fill +if flooded_biomes then + c_flood_fill = c_water +else + c_flood_fill = c_air +end minetest.register_biome({ name = "dfcaverns_level3_flooded_biome_lower", @@ -394,7 +412,7 @@ minetest.register_biome({ _subterrane_ceiling_decor = level_3_moist_ceiling, _subterrane_floor_decor = level_3_wet_floor, _subterrane_fill_node = c_air, - _subterrane_cave_fill_node = c_water, + _subterrane_cave_fill_node = c_flood_fill, _subterrane_mitigate_lava = true, }) diff --git a/config.lua b/config.lua index ba1febe..79b5544 100644 --- a/config.lua +++ b/config.lua @@ -83,6 +83,8 @@ setting("int", "lava_sea_min", -3500, "Lower limit of the lava sea") setting("float", "lava_sea_threshold", 0.2, "Cavern threshold for sunless and magma seas (higher number means sparser magma)") setting("bool", "enable_lava_sea", true, "Enable magma sea level") +setting("bool", "flooded_biomes", true, "Add a lot of water to the most humid cavern biomes") + if minetest.get_modpath("tnt") then dfcaverns.config.enable_tnt = minetest.settings:get_bool("enable_tnt") if dfcaverns.config.enable_tnt == nil then diff --git a/settingtypes.txt b/settingtypes.txt index 189a79c..2390f0b 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -48,4 +48,7 @@ dfcaverns_lava_sea_min (Lower limit of the lava sea) int -3500 #Determines threshold for lower sea cave generation. Higher number means sparser cavern dfcaverns_lava_sea_threshold (Cavern threshold for magma sea) float 0.2 0.0 1.0 #When true, the lava sea level is generated -dfcaverns_enable_lava_sea (Lower sea is lava) bool true \ No newline at end of file +dfcaverns_enable_lava_sea (Lower sea is lava) bool true +#When true cavern biomes at the most extreme humidity range will be flooded +#with water, providing significant challenges in those areas. +dfcaverns_flooded_biomes (Add a lot of water to the most humid cavern biomes) bool true \ No newline at end of file diff --git a/textures/dfcaverns_glow_ruby_ore.png b/textures/dfcaverns_glow_ruby_ore.png index 31ecb63..d63a4ba 100644 Binary files a/textures/dfcaverns_glow_ruby_ore.png and b/textures/dfcaverns_glow_ruby_ore.png differ