VoxeLibre/mods/MAPGEN/vl_biomes/deco/corals.lua

166 lines
4.4 KiB
Lua
Raw Normal View History

2024-10-24 01:24:22 +02:00
-- TODO: use priorities, and move this to the module where coral blocks are defined?
local mod_mcl_structures = minetest.get_modpath("mcl_structures")
local coral_min = vl_biomes.OCEAN_MIN
local coral_max = -10
2024-10-24 22:44:22 +02:00
local warm_oceans = table.copy(vl_biomes.by_water_temp.warm)
for _, v in ipairs(vl_biomes.by_water_temp.lukewarm) do table.insert(warm_oceans, v) end
--minetest.log("action", "Warm oceans: "..dump(warm_oceans,""))
2024-10-24 01:24:22 +02:00
-- Coral Reefs
for _, c in ipairs({ "brain", "horn", "bubble", "tube", "fire" }) do
local noise = {
offset = -0.0085,
scale = 0.002,
spread = vector.new(25, 120, 25),
seed = 235,
octaves = 5,
persist = 1.8,
lacunarity = 3.5,
flags = "absvalue"
}
mcl_mapgen_core.register_decoration({
deco_type = "schematic",
place_on = {"group:sand", "mcl_core:gravel", "mcl_mud:mud"},
sidelen = 80,
noise_params = noise,
biomes = warm_oceans,
y_min = coral_min,
y_max = coral_max,
schematic = mod_mcl_structures .. "/schematics/mcl_structures_coral_" .. c .. "_1.mts",
rotation = "random",
flags = "all_floors,force_placement",
2024-10-24 22:44:22 +02:00
spawn_by = "mcl_core:water_source",
check_offset = 1,
num_spawn_by = 12,
2024-10-24 01:24:22 +02:00
})
mcl_mapgen_core.register_decoration({
deco_type = "schematic",
place_on = {"group:sand", "mcl_core:gravel", "mcl_mud:mud"},
noise_params = noise,
sidelen = 80,
biomes = warm_oceans,
y_min = coral_min,
y_max = coral_max,
schematic = mod_mcl_structures .. "/schematics/mcl_structures_coral_" .. c .. "_2.mts",
rotation = "random",
flags = "all_floors,force_placement",
2024-10-24 22:44:22 +02:00
spawn_by = "mcl_core:water_source",
check_offset = 1,
num_spawn_by = 12,
2024-10-24 01:24:22 +02:00
})
mcl_mapgen_core.register_decoration({
deco_type = "simple",
place_on = {"mcl_ocean:" .. c .. "_coral_block"},
sidelen = 16,
fill_ratio = 3,
y_min = coral_min,
y_max = coral_max,
decoration = "mcl_ocean:" .. c .. "_coral",
biomes = warm_oceans,
flags = "force_placement, all_floors",
height = 1,
2024-10-24 22:44:22 +02:00
spawn_by = "mcl_core:water_source",
check_offset = 1,
num_spawn_by = 12,
2024-10-24 01:24:22 +02:00
})
end
mcl_mapgen_core.register_decoration({
deco_type = "simple",
place_on = {"group:sand", "mcl_core:gravel", "mcl_mud:mud"},
sidelen = 16,
noise_params = {
offset = -0.0085,
scale = 0.002,
spread = vector.new(25, 120, 25),
seed = 235,
octaves = 5,
persist = 1.8,
lacunarity = 3.5,
flags = "absvalue"
},
y_min = coral_min,
y_max = coral_max,
decoration = "mcl_ocean:dead_brain_coral_block",
biomes = warm_oceans,
flags = "force_placement",
height = 1,
height_max = 1,
place_offset_y = -1,
})
mcl_mapgen_core.register_decoration({
deco_type = "simple",
place_on = {"mcl_ocean:dead_brain_coral_block"},
sidelen = 16,
fill_ratio = 3,
y_min = coral_min,
y_max = coral_max,
decoration = "mcl_ocean:sea_pickle_1_dead_brain_coral_block",
biomes = warm_oceans,
flags = "force_placement, all_floors",
height = 1,
height_max = 1,
place_offset_y = -1,
})
mcl_mapgen_core.register_decoration({
deco_type = "simple",
place_on = {"mcl_ocean:dead_brain_coral_block"},
sidelen = 16,
fill_ratio = 3,
y_min = coral_min,
y_max = coral_max,
decoration = "mcl_ocean:sea_pickle_2_dead_brain_coral_block",
biomes = warm_oceans,
flags = "force_placement, all_floors",
height = 1,
height_max = 1,
place_offset_y = -1,
})
mcl_mapgen_core.register_decoration({
deco_type = "simple",
place_on = {"mcl_ocean:dead_brain_coral_block"},
sidelen = 16,
fill_ratio = 2,
y_min = coral_min,
y_max = coral_max,
decoration = "mcl_ocean:sea_pickle_3_dead_brain_coral_block",
biomes = warm_oceans,
flags = "force_placement, all_floors",
height = 1,
height_max = 1,
place_offset_y = -1,
})
mcl_mapgen_core.register_decoration({
deco_type = "simple",
place_on = {"mcl_ocean:dead_brain_coral_block"},
sidelen = 16,
fill_ratio = 2,
y_min = coral_min,
y_max = coral_max,
decoration = "mcl_ocean:sea_pickle_4_dead_brain_coral_block",
biomes = warm_oceans,
flags = "force_placement, all_floors",
height = 1,
height_max = 1,
place_offset_y = -1,
})
2024-10-24 22:44:22 +02:00
--rare CORAl easter egg (multicolored coral)
2024-10-24 01:24:22 +02:00
mcl_mapgen_core.register_decoration({
deco_type = "schematic",
place_on = {"group:sand", "mcl_core:gravel"},
fill_ratio = 0.0001,
sidelen = 80,
biomes = warm_oceans,
y_min = coral_min,
y_max = coral_max,
schematic = mod_mcl_structures .. "/schematics/coral_cora.mts",
rotation = "random",
flags = "all_floors,force_placement",
2024-10-24 22:44:22 +02:00
spawn_by = "mcl_core:water_source",
check_offset = 1,
num_spawn_by = 12,
2024-10-24 01:24:22 +02:00
})