From b6fa28c38100eb0ba288113da6bbbe4ca4bc23c1 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Sun, 19 Mar 2017 19:32:49 -0600 Subject: [PATCH] rough out some level2 biomes --- biomes.lua | 11 ++ biomes/level1.lua | 122 +++++++++++-- biomes/level2.lua | 455 ++++++++++++++++++++++++++++++++++++++++++++++ glow_worms.lua | 13 +- ground_cover.lua | 6 +- init.lua | 3 +- 6 files changed, 589 insertions(+), 21 deletions(-) diff --git a/biomes.lua b/biomes.lua index 3fcbadb..87f7c62 100644 --- a/biomes.lua +++ b/biomes.lua @@ -18,6 +18,17 @@ local c_cavern_fungi = minetest.get_content_id("dfcaverns:cavern_fungi") -- para local c_dirt_moss = minetest.get_content_id("dfcaverns:dirt_with_cave_moss") local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fungus") + +dfcaverns.config.ymax = subterrane.config.ymax + +dfcaverns.config.level1_min = -600 +dfcaverns.config.level2_min = -1000 +dfcaverns.config.level3_min = -1400 +dfcaverns.config.lava_sea_min = -1600 + +dfcaverns.config.ymin = subterrane.config.ymin + + dfcaverns.can_support_vegetation = {[c_sand] = true, [c_dirt] = true, [c_coal_ore] = true, [c_gravel] = true} dfcaverns.place_shrub = function(data, vi, param2_data) diff --git a/biomes/level1.lua b/biomes/level1.lua index ee066da..09edfc4 100644 --- a/biomes/level1.lua +++ b/biomes/level1.lua @@ -7,8 +7,9 @@ local c_dirt = minetest.get_content_id("default:dirt") local c_dirt_moss = minetest.get_content_id("dfcaverns:dirt_with_cave_moss") local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fungus") 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 ---dfcaverns.spawn_fungiwood_vm(vi, area, data) +local subsea_level = (dfcaverns.config.level1_min - dfcaverns.config.ymax) * 0.3 + dfcaverns.config.level1_min local level_1_tower_cap_floor = function(area, data, ai, vi, bi, param2_data) subterrane:obsidian_floor_dam(area, data, ai, vi, bi) @@ -69,11 +70,45 @@ local level_1_dry_floor = function(area, data, ai, vi, bi, param2_data) if drip_rand < 0.05 then --subterrane:stalagmite(bi, area, data, 6, 15, c_stone, c_stone, c_stone) local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 - local height = math.floor(drip_rand/0.025 * 5) + local height = math.floor(drip_rand/0.05 * 5) subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, false) end end +local level_1_wet_floor = function(area, data, ai, vi, bi, param2_data) + if data[bi] ~= c_stone then + return + end + + if math.random() < 0.25 then + data[bi] = c_dirt_moss + if math.random() < 0.1 then + data[vi] = c_dead_fungus + elseif math.random() < 0.1 then + data[vi] = c_cavern_fungi + end + else + data[bi] = c_dirt + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + + if drip_rand < 0.05 then + --subterrane:stalagmite(bi, area, data, 6, 15, c_stone, c_stone, c_stone) + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.05 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true) + end +end + + +local level_1_underwater_floor = function(area, data, ai, vi, bi, param2_data) + if data[bi] ~= c_stone then + return + end + data[bi] = c_dirt +end + local level_1_dry_ceiling = function(area, data, ai, vi, bi, param2_data) if data[ai] ~= c_stone then return @@ -82,7 +117,7 @@ local level_1_dry_ceiling = function(area, data, ai, vi, bi, param2_data) if drip_rand < 0.075 then --subterrane:stalactite(ai, area, data, 6, 20, c_stone, c_stone, c_stone) local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 - local height = math.floor(drip_rand/0.05 * 5) + local height = math.floor(drip_rand/0.075 * 5) subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, false) end end @@ -125,6 +160,12 @@ local level_1_cave_floor = function(area, data, ai, vi, bi, param2_data) end return end + + if data[bi] == c_cobble and math.random() < 0.001 then + data[bi] = c_cobble_fungus + return + end + if data[bi] ~= c_stone then return end @@ -153,21 +194,35 @@ end ------------------------------------------------------------------------------------------- + minetest.register_biome({ - name = "dfcaverns_level1_flooded_biome", - y_min = -2000, - y_max = -300, + name = "dfcaverns_level1_flooded_biome_lower", + y_min = dfcaverns.config.level1_min, + y_max = subsea_level, heat_point = -20, humidity_point = 0, _subterrane_fill_node = c_water, _subterrane_cave_fill_node = c_water, + _subterrane_floor_decor = level_1_underwater_floor, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_flooded_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.ymax, + heat_point = -20, + humidity_point = 0, + _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, }) minetest.register_biome({ - name = "dfcaverns_level1_tower_cap_biome", - y_min = -2000, - y_max = -300, + name = "dfcaverns_level1_tower_cap_biome_lower", + y_min = dfcaverns.config.level1_min, + y_max = subsea_level, heat_point = 80, humidity_point = 20, _subterrane_ceiling_decor = level_1_moist_ceiling, @@ -178,9 +233,22 @@ minetest.register_biome({ }) minetest.register_biome({ - name = "dfcaverns_level1_fungiwood_biome", - y_min = -2000, - y_max = -300, + name = "dfcaverns_level1_tower_cap_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.ymax, + heat_point = 80, + humidity_point = 20, + _subterrane_ceiling_decor = level_1_moist_ceiling, + _subterrane_floor_decor = level_1_tower_cap_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_1_cave_floor, + _subterrane_cave_ceiling_decor = level_1_cave_ceiling, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_fungiwood_biome_lower", + y_min = dfcaverns.config.level1_min, + y_max = subsea_level, heat_point = 60, humidity_point = 100, _subterrane_ceiling_decor = level_1_moist_ceiling, @@ -191,12 +259,36 @@ minetest.register_biome({ }) minetest.register_biome({ - name = "dfcaverns_level1_dry_biome", - y_min = -2000, - y_max = -300, + name = "dfcaverns_level1_fungiwood_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.ymax, + heat_point = 60, + humidity_point = 100, + _subterrane_ceiling_decor = level_1_moist_ceiling, + _subterrane_floor_decor = level_1_fungiwood_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_1_cave_floor, + _subterrane_cave_ceiling_decor = level_1_cave_ceiling, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_dry_biome_lower", + y_min = dfcaverns.config.level1_min, + y_max = subsea_level, heat_point = 20, humidity_point = 140, _subterrane_ceiling_decor = level_1_dry_ceiling, _subterrane_floor_decor = level_1_dry_floor, _subterrane_fill_node = c_air, }) + +minetest.register_biome({ + name = "dfcaverns_level1_dry_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.ymax, + heat_point = 20, + humidity_point = 140, + _subterrane_ceiling_decor = level_1_dry_ceiling, + _subterrane_floor_decor = level_1_dry_floor, + _subterrane_fill_node = c_air, +}) \ No newline at end of file diff --git a/biomes/level2.lua b/biomes/level2.lua index 31075ed..d784184 100644 --- a/biomes/level2.lua +++ b/biomes/level2.lua @@ -3,3 +3,458 @@ --dfcaverns.spawn_tunnel_tube_vm(vi, area, data, param2_data) --dfcaverns.spawn_spore_tree_vm(vi, data, area) --dfcaverns.spawn_goblin_cap_vm(vi, area, data) + +local c_water = minetest.get_content_id("default:water_source") +local c_air = minetest.get_content_id("air") +local c_stone = minetest.get_content_id("default:stone") +local c_cobble = minetest.get_content_id("default:cobble") +local c_dirt = minetest.get_content_id("default:dirt") + +local c_dirt_moss = minetest.get_content_id("dfcaverns:dirt_with_cave_moss") +local c_cobble_fungus = minetest.get_content_id("dfcaverns:cobble_with_floor_fungus") +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.level2_min - dfcaverns.config.level1_min) * 0.3 + dfcaverns.config.level2_min + + +local level_2_tower_cap_floor = function(area, data, ai, vi, bi, param2_data) + subterrane:obsidian_floor_dam(area, data, ai, vi, bi) + if data[bi] ~= c_stone then + return + end + + if math.random() < 0.25 then + data[bi] = c_dirt + else + data[bi] = c_dirt_moss + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + if math.random() < 0.1 then + dfcaverns.place_shrub(data, vi, param2_data) + elseif drip_rand < 0.1 then + --subterrane:stalagmite(bi, area, data, 6, 15, c_stone, c_stone, c_stone) + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.1 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true) + elseif math.random() < 0.005 then + dfcaverns.spawn_tower_cap_vm(bi, area, data) + end +end + +local level_2_moist_ceiling = function(area, data, ai, vi, bi, param2_data) + subterrane:obsidian_ceiling_plug(area, data, ai, vi, bi) + if data[ai] ~= c_stone then + return + end + local drip_rand = subterrane:vertically_consistent_random(vi, area) + if drip_rand < 0.075 then + --subterrane:stalactite(ai, area, data, 6, 20, c_stone, c_stone, c_stone) + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.075 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, true) + elseif math.random() < 0.03 then + dfcaverns.glow_worm_ceiling(area, data, ai, vi, bi) + end +end + +local level_2_dry_floor = function(area, data, ai, vi, bi, param2_data) + if data[bi] ~= c_stone then + return + end + + if math.random() < 0.25 then + data[bi] = c_cobble_fungus + if math.random() < 0.1 then + data[vi] = c_dead_fungus + end + elseif math.random() < 0.5 then + data[bi] = c_cobble + end + local drip_rand = subterrane:vertically_consistent_random(vi, area) + + if drip_rand < 0.05 then + --subterrane:stalagmite(bi, area, data, 6, 15, c_stone, c_stone, c_stone) + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.05 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, false) + end +end + +local level_2_wet_floor = function(area, data, ai, vi, bi, param2_data) + if data[bi] ~= c_stone then + return + end + + if math.random() < 0.25 then + data[bi] = c_dirt_moss + if math.random() < 0.1 then + data[vi] = c_dead_fungus + elseif math.random() < 0.1 then + data[vi] = c_cavern_fungi + end + else + data[bi] = c_dirt + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + + if drip_rand < 0.05 then + --subterrane:stalagmite(bi, area, data, 6, 15, c_stone, c_stone, c_stone) + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.05 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true) + end +end + + +local level_2_underwater_floor = function(area, data, ai, vi, bi, param2_data) + if data[bi] ~= c_stone then + return + end + data[bi] = c_dirt +end + +local level_2_dry_ceiling = function(area, data, ai, vi, bi, param2_data) + if data[ai] ~= c_stone then + return + end + local drip_rand = subterrane:vertically_consistent_random(vi, area) + if drip_rand < 0.075 then + --subterrane:stalactite(ai, area, data, 6, 20, c_stone, c_stone, c_stone) + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.075 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, false) + end +end + + +local level_2_fungiwood_floor = function(area, data, ai, vi, bi, param2_data) + subterrane:obsidian_floor_dam(area, data, ai, vi, bi) + if data[bi] ~= c_stone then + return + end + + if math.random() < 0.25 then + data[bi] = c_dirt + else + data[bi] = c_dirt_moss + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + + if math.random() < 0.1 then + dfcaverns.place_shrub(data, vi, param2_data) + elseif drip_rand < 0.1 then + --subterrane:stalagmite(bi, area, data, 6, 15, c_stone, c_stone, c_stone) + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.1 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true) + elseif math.random() < 0.005 then + dfcaverns.spawn_fungiwood_vm(bi, area, data) + end +end + +local level_2_tunnel_tube_floor = function(area, data, ai, vi, bi, param2_data) + subterrane:obsidian_floor_dam(area, data, ai, vi, bi) + if data[bi] ~= c_stone then + return + end + + if math.random() < 0.25 then + data[bi] = c_dirt + else + data[bi] = c_dirt_moss + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + + if math.random() < 0.1 then + dfcaverns.place_shrub(data, vi, param2_data) + elseif drip_rand < 0.1 then + --subterrane:stalagmite(bi, area, data, 6, 15, c_stone, c_stone, c_stone) + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.1 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true) + elseif math.random() < 0.05 then + dfcaverns.spawn_tunnel_tube_vm(bi, area, data) + end +end + +local level_2_spore_tree_floor = function(area, data, ai, vi, bi, param2_data) + subterrane:obsidian_floor_dam(area, data, ai, vi, bi) + if data[bi] ~= c_stone then + return + end + + if math.random() < 0.25 then + data[bi] = c_dirt + else + data[bi] = c_dirt_moss + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + + if math.random() < 0.1 then + dfcaverns.place_shrub(data, vi, param2_data) + elseif drip_rand < 0.1 then + --subterrane:stalagmite(bi, area, data, 6, 15, c_stone, c_stone, c_stone) + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.1 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true) + elseif math.random() < 0.05 then + dfcaverns.spawn_spore_tree_vm(bi, area, data) + end +end + +local level_2_goblin_cap_floor = function(area, data, ai, vi, bi, param2_data) + subterrane:obsidian_floor_dam(area, data, ai, vi, bi) + if data[bi] ~= c_stone then + return + end + + if math.random() < 0.25 then + data[bi] = c_dirt + else + data[bi] = c_dirt_moss + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + + if math.random() < 0.1 then + dfcaverns.place_shrub(data, vi, param2_data) + elseif drip_rand < 0.1 then + --subterrane:stalagmite(bi, area, data, 6, 15, c_stone, c_stone, c_stone) + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.1 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true) + elseif math.random() < 0.025 then + dfcaverns.spawn_goblin_cap_vm(bi, area, data) + end +end + +local level_2_cave_floor = function(area, data, ai, vi, bi, param2_data) + if dfcaverns.can_support_vegetation[data[bi]] then + data[bi] = c_dirt_moss + if math.random() < 0.25 then + if data[vi] == c_air then + dfcaverns.place_shrub(data, vi, param2_data) + end + end + return + end + + if data[bi] == c_cobble and math.random() < 0.001 then + data[bi] = c_cobble_fungus + return + end + + if data[bi] ~= c_stone then + return + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + if drip_rand < 0.075 then + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.075 * 4) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, height, true) + end +end + +local level_2_cave_ceiling = function(area, data, ai, vi, bi, param2_data) + if data[ai] ~= c_stone then + return + end + + local drip_rand = subterrane:vertically_consistent_random(vi, area) + + if drip_rand < 0.1 then + local param2 = drip_rand*1000000 - math.floor(drip_rand*1000000/4)*4 + local height = math.floor(drip_rand/0.1 * 5) + subterrane:small_stalagmite(vi, area, data, param2_data, param2, -height, true) + end +end + +------------------------------------------------------------------------------------------- + + +minetest.register_biome({ + name = "dfcaverns_level1_flooded_biome_lower", + y_min = dfcaverns.config.level2_min, + y_max = subsea_level, + heat_point = 20, + humidity_point = 0, + _subterrane_fill_node = c_water, + _subterrane_cave_fill_node = c_water, + _subterrane_floor_decor = level_2_underwater_floor, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_flooded_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.level1_min, + heat_point = 20, + humidity_point = 0, + _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, +}) + + +minetest.register_biome({ + name = "dfcaverns_level1_tower_cap_biome_lower", + y_min = dfcaverns.config.level2_min, + y_max = subsea_level, + heat_point = 40, + humidity_point = 10, + _subterrane_ceiling_decor = level_2_moist_ceiling, + _subterrane_floor_decor = level_2_tower_cap_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_2_cave_floor, + _subterrane_cave_ceiling_decor = level_2_cave_ceiling, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_tower_cap_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.level1_min, + heat_point = 40, + humidity_point = 10, + _subterrane_ceiling_decor = level_2_moist_ceiling, + _subterrane_floor_decor = level_2_tower_cap_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_2_cave_floor, + _subterrane_cave_ceiling_decor = level_2_cave_ceiling, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_fungiwood_biome_lower", + y_min = dfcaverns.config.level2_min, + y_max = subsea_level, + heat_point = 80, + humidity_point = 60, + _subterrane_ceiling_decor = level_2_moist_ceiling, + _subterrane_floor_decor = level_2_fungiwood_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_2_cave_floor, + _subterrane_cave_ceiling_decor = level_2_cave_ceiling, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_fungiwood_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.level1_min, + heat_point = 80, + humidity_point = 60, + _subterrane_ceiling_decor = level_2_moist_ceiling, + _subterrane_floor_decor = level_2_fungiwood_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_2_cave_floor, + _subterrane_cave_ceiling_decor = level_2_cave_ceiling, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_goblin_cap_biome_lower", + y_min = dfcaverns.config.level2_min, + y_max = subsea_level, + heat_point = 60, + humidity_point = 30, + _subterrane_ceiling_decor = level_2_moist_ceiling, + _subterrane_floor_decor = level_2_goblin_cap_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_2_cave_floor, + _subterrane_cave_ceiling_decor = level_2_cave_ceiling, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_goblin_cap_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.level1_min, + heat_point = 60, + humidity_point = 30, + _subterrane_ceiling_decor = level_2_moist_ceiling, + _subterrane_floor_decor = level_2_goblin_cap_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_2_cave_floor, + _subterrane_cave_ceiling_decor = level_2_cave_ceiling, +}) + + +minetest.register_biome({ + name = "dfcaverns_level1_spore_tree_biome_lower", + y_min = dfcaverns.config.level2_min, + y_max = subsea_level, + heat_point = 60, + humidity_point = 80, + _subterrane_ceiling_decor = level_2_moist_ceiling, + _subterrane_floor_decor = level_2_spore_tree_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_2_cave_floor, + _subterrane_cave_ceiling_decor = level_2_cave_ceiling, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_spore_tree_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.level1_min, + heat_point = 60, + humidity_point = 80, + _subterrane_ceiling_decor = level_2_moist_ceiling, + _subterrane_floor_decor = level_2_spore_tree_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_2_cave_floor, + _subterrane_cave_ceiling_decor = level_2_cave_ceiling, +}) + + + +minetest.register_biome({ + name = "dfcaverns_level1_tunnel_tube_biome_lower", + y_min = dfcaverns.config.level2_min, + y_max = subsea_level, + heat_point = 40, + humidity_point = 100, + _subterrane_ceiling_decor = level_2_moist_ceiling, + _subterrane_floor_decor = level_2_tunnel_tube_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_2_cave_floor, + _subterrane_cave_ceiling_decor = level_2_cave_ceiling, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_tunnel_tube_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.level1_min, + heat_point = 40, + humidity_point = 100, + _subterrane_ceiling_decor = level_2_moist_ceiling, + _subterrane_floor_decor = level_2_tunnel_tube_floor, + _subterrane_fill_node = c_air, + _subterrane_cave_floor_decor = level_2_cave_floor, + _subterrane_cave_ceiling_decor = level_2_cave_ceiling, +}) + + +minetest.register_biome({ + name = "dfcaverns_level1_dry_biome_lower", + y_min = dfcaverns.config.level2_min, + y_max = subsea_level, + heat_point = 20, + humidity_point = 110, + _subterrane_ceiling_decor = level_2_dry_ceiling, + _subterrane_floor_decor = level_2_dry_floor, + _subterrane_fill_node = c_air, +}) + +minetest.register_biome({ + name = "dfcaverns_level1_dry_biome_upper", + y_min = subsea_level, + y_max = dfcaverns.config.level1_min, + heat_point = 20, + humidity_point = 110, + _subterrane_ceiling_decor = level_2_dry_ceiling, + _subterrane_floor_decor = level_2_dry_floor, + _subterrane_fill_node = c_air, +}) \ No newline at end of file diff --git a/glow_worms.lua b/glow_worms.lua index ccfc8de..3440436 100644 --- a/glow_worms.lua +++ b/glow_worms.lua @@ -44,4 +44,15 @@ dfcaverns.glow_worm_ceiling = function(area, data, ai, vi, bi) end end end -end \ No newline at end of file +end + +minetest.register_abm({ + label = "dfcaverns:water_destroys_glow_worms", + nodenames = {"dfcaverns:glow_worm"}, + neighbors = {"default:water_source"}, + interval = 1, + chance = 10, + action = function (pos) + minetest.set_node(pos, {name="air"}) + end, +}) \ No newline at end of file diff --git a/ground_cover.lua b/ground_cover.lua index e2226bf..14a6b46 100644 --- a/ground_cover.lua +++ b/ground_cover.lua @@ -30,7 +30,7 @@ minetest.register_abm{ label = "dfcaverns:cave_moss_spread", nodenames = {"default:dirt"}, neighbors = {"dfcaverns:dirt_with_cave_moss"}, - interval = 30, + interval = 60, chance = 10, catch_up = true, action = function(pos) @@ -62,8 +62,8 @@ minetest.register_abm{ label = "dfcaverns:floor_fungus_spread", nodenames = {"default:cobble"}, neighbors = {"dfcaverns:cobble_with_floor_fungus"}, - interval = 30, - chance = 10, + interval = 60, + chance = 30, catch_up = true, action = function(pos) minetest.swap_node(pos, {name="dfcaverns:cobble_with_floor_fungus"}) diff --git a/init.lua b/init.lua index 8062a5d..1cbe030 100644 --- a/init.lua +++ b/init.lua @@ -2,8 +2,6 @@ dfcaverns = {} subterrane.get_param2_data = true -minetest.register_alias_force("mapgen_lava_source", "air") - --grab a shorthand for the filepath of the mod local modpath = minetest.get_modpath(minetest.get_current_modname()) @@ -40,6 +38,7 @@ dofile(modpath.."/biomes/level3.lua") dofile(modpath.."/biomes/lava_sea.lua") dofile(modpath.."/biomes/underworld.lua") +minetest.register_alias_force("mapgen_lava_source", "air") -- veins of lava are far more realistic minetest.register_ore({ ore_type = "vein", ore = "default:lava_source",