Add biome version 1

master
Wuzzy 2022-05-18 13:46:03 +02:00
parent 67489e6de0
commit da13111d6a
2 changed files with 293 additions and 1 deletions

View File

@ -22,6 +22,32 @@ default.SAPLING_FERTILIZER_TIME_BONUS_FACTOR = 0.1
minetest.nodedef_default.stack_max = 60
minetest.craftitemdef_default.stack_max = 60
--[[ This game uses biome versions to allow backwards-compability
of old maps. A biome version bump is neccessary whenever there's
a drastic change in biome heat/humidity point that would
lead to ugly discontinutities after a game update.
Version 1: Closest to the original Pixture game.
Used till game version 2.1.0
Version 2: Major biome update introducing tons of new biomes and
removing the Desert. Introduced more swamp biomes,
swamp highland, dry land biomes, shrubbery, oak forests,
birch forests, "technical" ocean/beach biomes,
Underground biome, and much more.
Biome heat/humidity points of existing biomes had to be
completely updated.
Introduced in game version 2.2.0.
]]
local LATEST_BIOME_VERSION = 2
local bv = minetest.get_mapgen_setting("rp_biome_version")
if bv then
default.biome_version = tonumber(default.biome_version)
end
if default.biome_version ~= 1 and default.biome_version ~= 2 then
default.biome_version = LATEST_BIOME_VERSION
end
dofile(minetest.get_modpath("rp_default").."/functions.lua")
dofile(minetest.get_modpath("rp_default").."/nodes.lua") -- simple nodes
@ -41,7 +67,7 @@ dofile(minetest.get_modpath("rp_default").."/crafting.lua")
dofile(minetest.get_modpath("rp_default").."/achievements.lua")
dofile(minetest.get_modpath("rp_default").."/mapgen_core.lua")
dofile(minetest.get_modpath("rp_default").."/mapgen_biomes_v2.lua")
dofile(minetest.get_modpath("rp_default").."/mapgen_biomes_v"..default.biome_version..".lua")
dofile(minetest.get_modpath("rp_default").."/mapgen_ores.lua")
dofile(minetest.get_modpath("rp_default").."/mapgen_deco.lua")

View File

@ -0,0 +1,266 @@
--[[ BIOMES, version 1 (Repixture 2.1.0) ]]
minetest.clear_registered_biomes()
local mg_name = minetest.get_mapgen_setting("mg_name")
if mg_name ~= "v6" then
minetest.register_biome(
{
name = "Marsh",
node_top = "rp_default:dirt_with_grass",
node_filler = "rp_default:dirt",
depth_filler = 0,
depth_top = 1,
y_min = 2,
y_max = 6,
heat_point = 35,
humidity_point = 55,
})
minetest.register_biome(
{
name = "Swamp",
node_top = "rp_default:dirt_with_swamp_grass",
node_filler = "rp_default:swamp_dirt",
depth_filler = 7,
depth_top = 1,
y_min = 2,
y_max = 7,
heat_point = 30,
humidity_point = 42,
})
minetest.register_biome(
{
name = "Deep Forest",
node_top = "rp_default:dirt_with_grass",
node_filler = "rp_default:dirt",
depth_filler = 6,
depth_top = 1,
y_min = 30,
y_max = 40,
heat_point = 33,
humidity_point = 40,
})
minetest.register_biome(
{
name = "Forest",
node_top = "rp_default:dirt_with_grass",
node_filler = "rp_default:dirt",
depth_filler = 6,
depth_top = 1,
y_min = 2,
y_max = 200,
heat_point = 35,
humidity_point = 40,
})
minetest.register_biome(
{
name = "Grove",
node_top = "rp_default:dirt_with_grass",
node_filler = "rp_default:dirt",
depth_filler = 4,
depth_top = 1,
y_min = 3,
y_max = 32000,
heat_point = 40,
humidity_point = 38,
})
minetest.register_biome(
{
name = "Wilderness",
node_top = "rp_default:dirt_with_grass",
node_filler = "rp_default:dirt",
depth_filler = 6,
depth_top = 1,
y_min = 3,
y_max = 32000,
heat_point = 46,
humidity_point = 35,
})
minetest.register_biome(
{
name = "Grassland",
node_top = "rp_default:dirt_with_grass",
node_filler = "rp_default:dirt",
depth_filler = 4,
depth_top = 1,
y_min = 3,
y_max = 20,
heat_point = 50,
humidity_point = 33,
})
minetest.register_biome(
{
name = "Orchard",
node_top = "rp_default:dirt_with_grass",
node_filler = "rp_default:dirt",
depth_filler = 4,
depth_top = 1,
y_min = 21,
y_max = 32000,
heat_point = 50,
humidity_point = 33,
})
minetest.register_biome(
{
name = "Chaparral",
node_top = "rp_default:dirt_with_dry_grass",
node_filler = "rp_default:dry_dirt",
depth_filler = 0,
depth_top = 1,
y_min = 56,
y_max = 32000,
heat_point = 60,
humidity_point = 30,
})
minetest.register_biome(
{
name = "Savanna",
node_top = "rp_default:dirt_with_dry_grass",
node_filler = "rp_default:dry_dirt",
depth_filler = 2,
depth_top = 1,
y_min = 1,
y_max = 55,
heat_point = 60,
humidity_point = 25,
})
minetest.register_biome(
{
name = "Desert",
node_top = "rp_default:sand",
node_filler = "rp_default:sandstone",
depth_filler = 8,
depth_top = 3,
y_min = 1,
y_max = 32000,
heat_point = 75,
humidity_point = 20,
})
minetest.register_biome(
{
name = "Wasteland",
node_top = "rp_default:dry_dirt",
node_filler = "rp_default:sandstone",
depth_filler = 3,
depth_top = 1,
y_min = -32000,
y_max = 32000,
heat_point = 80,
humidity_point = 20,
})
-- Oceans
minetest.register_biome(
{
name = "Grassland Ocean",
node_top = "rp_default:sand",
node_filler = "rp_default:dirt",
depth_filler = 1,
depth_top = 3,
y_min = default.GLOBAL_Y_MIN,
y_max = 2,
heat_point = 50,
humidity_point = 35,
})
minetest.register_biome(
{
name = "Gravel Beach",
node_top = "rp_default:gravel",
node_filler = "rp_default:sand",
depth_filler = 2,
depth_top = 1,
y_min = -5,
y_max = 1,
heat_point = 59,
humidity_point = 31,
})
minetest.register_biome(
{
name = "Savanna Ocean",
node_top = "rp_default:dirt",
node_filler = "dfault:dirt",
depth_filler = 0,
depth_top = 1,
y_min = default.GLOBAL_Y_MIN,
y_max = 0,
heat_point = 60,
humidity_point = 30,
})
end