mirror of
https://github.com/FaceDeer/dfcaverns.git
synced 2025-01-12 19:20:27 +01:00
add option to turn magma sea into water
This commit is contained in:
parent
34387d6d6d
commit
bd7d02501b
@ -13,13 +13,26 @@ local c_cavern_fungi = minetest.get_content_id("dfcaverns:cavern_fungi") -- para
|
||||
|
||||
-------------------------------------------------------------------------------------------
|
||||
|
||||
minetest.register_biome({
|
||||
local lava_sea_biome_def = {
|
||||
name = "dfcaverns_lava_sea",
|
||||
y_min = dfcaverns.config.lava_sea_min,
|
||||
y_max = dfcaverns.config.level3_min,
|
||||
heat_point = 50,
|
||||
humidity_point = 50,
|
||||
})
|
||||
}
|
||||
|
||||
if not dfcaverns.config.bottom_sea_contains_lava then
|
||||
lava_sea_biome_def._subterrane_mitigate_lava = true
|
||||
end
|
||||
|
||||
minetest.register_biome(lava_sea_biome_def)
|
||||
|
||||
local c_sea
|
||||
if dfcaverns.config.bottom_sea_contains_lava then
|
||||
c_sea = c_lava
|
||||
else
|
||||
c_sea = c_water
|
||||
end
|
||||
|
||||
local airspace = 256
|
||||
|
||||
@ -45,12 +58,11 @@ minetest.register_on_generated(function(minp, maxp, seed)
|
||||
vm:get_data(data)
|
||||
|
||||
for z = z_min, z_max do -- for each xy plane progressing northwards
|
||||
--structure loop, hollows out the cavern
|
||||
for y = y_min, y_max do -- for each x row progressing upwards
|
||||
local vi = area:index(x_min, y, z) --current node index
|
||||
for x = x_min, x_max do -- for each node do
|
||||
if data[vi] == c_air or data[vi] == c_water then
|
||||
data[vi] = c_lava
|
||||
data[vi] = c_sea
|
||||
end
|
||||
vi = vi + 1
|
||||
end
|
||||
|
@ -68,4 +68,6 @@ setting("int", "level1_min", -900, "Upper limit of level 2")
|
||||
setting("int", "level2_min", -1500, "Upper limit of level 3")
|
||||
setting("int", "level3_min", -2100, "Upper limit of lava sea")
|
||||
setting("int", "lava_sea_min", -2700, "Lower limit of the lava sea")
|
||||
|
||||
setting("float", "lava_sea_threshold", 0.2, "Cavern threshold for magma sea (higher number means sparser magma)")
|
||||
setting("bool", "bottom_sea_contains_lava", true, "Lower sea contains lava")
|
||||
|
@ -36,5 +36,8 @@ dfcaverns_level2_min (Upper limit of level 3) int -1500
|
||||
dfcaverns_level3_min (Upper limit of lava sea) int -2100
|
||||
dfcaverns_lava_sea_min (Lower limit of lava sea) int -2700
|
||||
|
||||
[Lower Sea]
|
||||
#Determines threshold for higher number means sparser magma
|
||||
dfcaverns_lava_sea_threshold (Cavern threshold for magma sea) float 0.2 0.0 1.0
|
||||
dfcaverns_lava_sea_threshold (Cavern threshold for magma sea) float 0.2 0.0 1.0
|
||||
#When true, the magma sea contains magma. When false, it's water instead.
|
||||
dfcaverns_bottom_sea_contains_lava (Lower sea is lava) bool true
|
Loading…
Reference in New Issue
Block a user