Merge pull request 'Lift clouds to 384 in valleys mapgen' (#2110) from raise_valleys_clouds into master

Reviewed-on: MineClone2/MineClone2#2110
This commit is contained in:
cora 2022-04-19 10:26:41 +00:00
commit 231b658c3f
2 changed files with 20 additions and 2 deletions

View File

@ -153,3 +153,22 @@ minetest.register_globalstep(function(dtime)
end
end)
function mcl_worlds.get_cloud_parameters()
if minetest.get_mapgen_setting("mg_name") == "valleys" then
return {
height = 384, --valleys has a much higher average elevation thus often "normal" landscape ends up in the clouds
speed = {x=-2, z=0},
thickness=5,
color="#FFF0FEF",
ambient = "#201060",
}
else
-- MC-style clouds: Layer 127, thickness 4, fly to the “West”
return {
height = mcl_worlds.layer_to_y(127),
speed = {x=-2, z=0},
thickness = 4,
color = "#FFF0FEF",
}
end
end

View File

@ -240,8 +240,7 @@ local function initsky(player)
mcl_weather.skycolor.force_update = true
end
-- MC-style clouds: Layer 127, thickness 4, fly to the “West”
player:set_clouds({height=mcl_worlds.layer_to_y(127), speed={x=-2, z=0}, thickness=4, color="#FFF0FEF"})
player:set_clouds(mcl_worlds:get_cloud_parameters() or {height=mcl_worlds.layer_to_y(127), speed={x=-2, z=0}, thickness=4, color="#FFF0FEF"})
end
minetest.register_on_joinplayer(initsky)