Skip to content

Commit

Permalink
Merge pull request #203 from dacmot/main
Browse files Browse the repository at this point in the history
Update minetest_mapgen_config from upstream
  • Loading branch information
dacmot authored Jul 23, 2024
2 parents 8653ca9 + 884e2db commit a0e4f85
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 15 deletions.
2 changes: 1 addition & 1 deletion builder/mods_src/mapgen/minetest_mapgen_config
Submodule minetest_mapgen_config updated from c183a5 to 085d11
2 changes: 1 addition & 1 deletion mod_sources.txt
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ origin https://github.com/minetest-mods/meseor (fetch)
Mod: mapgen/meseor

origin https://codeberg.org/Dacmot/minetest_mapgen_config.git (fetch)
* c183a55212346ea9bab3ad3e00a0186a550211e1 Many corrections and adjustments of ore depth
* 085d115af45986defe6edc623b82c49ddb3ef054 Tweak the mountain top biome
Mod: mapgen/minetest_mapgen_config

origin https://github.com/minetest-mirrors/pbj_pup.git (fetch)
Expand Down
21 changes: 8 additions & 13 deletions mods/mapgen/minetest_mapgen_config/biomes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@ local function copy_biome(def, variant_suffix)
local def = table.copy(def or minetest.registered_biomes[old_name])
def.name = old_name.."_"..variant_suffix

-- for _, decor in pairs(minetest.registered_decorations) do
-- if decor.biomes then
-- for _, biome in pairs(decor.biomes) do
-- if (biome == old_name) then
-- table.insert(decor.biomes, def.name)
-- break
-- end
-- end
-- end
-- end

return def
end

Expand All @@ -52,9 +41,11 @@ local floatlands_biomes_ymax = tonumber(Mapgen_conf.get_setting("mapgen_conf.flo
local floatlands_biomes_exclusions = Mapgen_conf.get_setting("mapgen_conf.floatlands_biomes_exclusions", "tundra icesheet cold_desert grassland_dunes snowy_grassland")

minetest.log("info", "Mapgen config: modifying biomes...")
for name, def in pairs(minetest.registered_biomes) do

minetest.unregister_biome(name)
local rbiomes = table.copy(minetest.registered_biomes)
minetest.clear_registered_biomes()

for name, def in pairs(rbiomes) do

-- Last layer before mountain tops
if (def.y_max >= lower_atmosphere_biome_ymax) then
Expand All @@ -78,6 +69,10 @@ for name, def in pairs(minetest.registered_biomes) do

else
-- Create mountain tops by re-purposing tundra_highland
def.node_top = "default:ice"
def.depth_top = 1
def.node_filler = "default:snowblock"
def.depth_filler = 3
def.y_max = lower_atmosphere_biome_ymax - 1
def.y_min = mountaintops_altitude
end
Expand Down

0 comments on commit a0e4f85

Please sign in to comment.