More work being done. And... bugs.
All checks were successful
Error Check / luacheck_errcheck (push) Successful in 37s
Unit Tests / busted_unit_test (push) Successful in 48s

This commit is contained in:
DesertMermaid 2024-12-11 14:47:15 -08:00
parent 0242488c9e
commit a260c4a33a
20 changed files with 1102 additions and 80 deletions

View file

@ -0,0 +1,42 @@
# Biome Registry Template
```lua
core.register_biome({
name = "temperate_forest",
node_top = "vox_worldblocks:grass", -- Top surface block
depth_top = 1, -- Depth of the top block
node_filler = "vox_worldblocks:dirt", -- Subsurface block
depth_filler = 3, -- Depth of filler layer
node_stone = "vox_worldblocks:stone", -- Base stone layer
node_riverbed = "vox_worldblocks:sand", -- Riverbed material
depth_riverbed = 2, -- Depth of riverbed material
node_river_water = "vox_worldblocks:water_source", -- Water source
heat_point = 45, -- Climate heat level
humidity_point = 70, -- Climate humidity level
height_min = 1, -- Minimum height for the biome
height_max = 128, -- Maximum height for the biome
decorations = {"flowers:rose", "flowers:tulip"}, -- Decoration nodes
biome_group = "temperate", -- Biome category (for climate/weather)
})
```
OLD:
```lua
core.register_biome({
name = "grassland",
node_top = "grass",
depth_top = 1,
node_filler = "vox_main:dirt",
node_stone = "vox_main:stone",
depth_filler = 3,
node_riverbed = "vox_main:sand",
node_river_water = "vox_main:water_source",
depth_riverbed = 2,
height_min = 1,
height_max = 256,
heat_point = 35,
humidity_point = 50
})
```

View file

@ -15,4 +15,5 @@ vox_overworld = {}
dofile(core.get_modpath(core.get_current_modname()) .. "/registry.lua")
-- Ensure vox_mapgen_core is loaded
--local mapgen_core = assert(vox_mapgen_core, "vox_mapgen_core must be loaded before vox_overworld")

View file

@ -2,27 +2,190 @@
-- Voxelis - Voxel survival sandbox for Luanti
-- Copyright (C) 2024 Mad Star Studio LLC
--
-- This program is free software; you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation; either version 3 of the License, or
-- (at your option) any later version.
--
-- You should have received a copy of the GNU General Public License along
-- with this program; if not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------
core.register_biome({
-- -------------------------------------------------------------- --
-- BIOMES
-- -------------------------------------------------------------- --
-- Helper Function: Register Default Biome Properties
local function register_biome(params)
-- Set defaults for biome parameters
params.node_river_water = params.node_river_water or "vox_worldblocks:water_source"
params.depth_riverbed = params.depth_riverbed or 2
params.height_min = params.height_min or 1
params.height_max = params.height_max or 256
params.node_stone = params.node_stone or "vox_worldblocks:stone"
core.register_biome(params)
end
-- Grasslands
register_biome({
name = "grassland",
node_top = "grass",
node_top = "vox_worldblocks:grass",
depth_top = 1,
node_filler = "vox_main:dirt",
node_stone = "vox_main:stone",
node_filler = "vox_worldblocks:dirt",
depth_filler = 3,
node_riverbed = "vox_main:sand",
node_river_water = "vox_main:water_source",
depth_riverbed = 2,
height_min = 1,
height_max = 256,
heat_point = 35,
humidity_point = 50
humidity_point = 50,
})
-- Desert
register_biome({
name = "desert",
node_top = "vox_worldblocks:sand",
depth_top = 2,
node_filler = "vox_worldblocks:sandstone",
depth_filler = 5,
heat_point = 80,
humidity_point = 20,
})
-- Boreal Forest
register_biome({
name = "boreal_forest",
node_top = "vox_worldblocks:grass",
depth_top = 1,
node_filler = "vox_worldblocks:dirt",
depth_filler = 4,
heat_point = 20,
humidity_point = 60,
})
-- Frozen Tundra
register_biome({
name = "frozen_tundra",
node_top = "vox_worldblocks:snow",
depth_top = 1,
node_filler = "vox_worldblocks:packed_snow",
depth_filler = 3,
node_riverbed = "vox_worldblocks:ice",
heat_point = 5,
humidity_point = 40,
height_max = 150,
})
-- Rocky Badlands
register_biome({
name = "rocky_badlands",
node_top = "vox_worldblocks:stone",
depth_top = 2,
node_filler = "vox_worldblocks:gravel",
depth_filler = 4,
heat_point = 50,
humidity_point = 30,
height_min = 50,
height_max = 180,
})
-- Savannah
register_biome({
name = "savannah",
node_top = "vox_worldblocks:grass",
depth_top = 1,
node_filler = "vox_worldblocks:dirt",
depth_filler = 3,
heat_point = 70,
humidity_point = 30,
height_max = 512,
})
-- Mangrove Forest
register_biome({
name = "mangrove_forest",
node_top = "vox_worldblocks:grass",
depth_top = 1,
node_filler = "vox_worldblocks:mud",
depth_filler = 3,
node_riverbed = "vox_worldblocks:mud",
heat_point = 75,
humidity_point = 80,
height_min = -5,
height_max = 100,
})
-- Volcanic Fields
register_biome({
name = "volcanic_fields",
node_top = "vox_worldblocks:volcanic_rock",
depth_top = 1,
node_filler = "vox_worldblocks:basalt",
depth_filler = 5,
node_riverbed = "vox_worldblocks:lava_source",
node_river_water = "vox_worldblocks:lava_source",
heat_point = 90,
humidity_point = 10,
height_min = 50,
height_max = 512,
})
-- Salt Flats
register_biome({
name = "salt_flats",
node_top = "vox_worldblocks:salt_crystal",
depth_top = 2,
node_filler = "vox_worldblocks:sand",
depth_filler = 3,
heat_point = 80,
humidity_point = 20,
height_max = 100,
})
-- Jade Cliffs
register_biome({
name = "jade_cliffs",
node_top = "vox_worldblocks:grass",
depth_top = 1,
node_filler = "vox_worldblocks:stone",
depth_filler = 5,
node_stone = "vox_worldblocks:granite",
node_riverbed = "vox_worldblocks:gravel",
heat_point = 55,
humidity_point = 65,
height_min = 128,
height_max = 1024,
})
-- Painted Canyons
register_biome({
name = "painted_canyons",
node_top = "vox_worldblocks:terracotta_red",
depth_top = 1,
node_filler = "vox_worldblocks:terracotta_orange",
depth_filler = 4,
node_riverbed = "vox_worldblocks:terracotta_yellow",
heat_point = 65,
humidity_point = 25,
height_min = 10,
height_max = 256,
})
-- Iceberg Fields
register_biome({
name = "iceberg_fields",
node_top = "vox_worldblocks:ice",
depth_top = 1,
node_filler = "vox_worldblocks:snow",
depth_filler = 3,
node_riverbed = "vox_worldblocks:ice",
heat_point = -10,
humidity_point = 50,
height_min = -100,
height_max = 100,
})
-- Black Sand Beach
register_biome({
name = "black_sand_beach",
node_top = "vox_worldblocks:basalt",
depth_top = 2,
node_filler = "vox_worldblocks:sand",
depth_filler = 3,
heat_point = 65,
humidity_point = 80,
height_min = -5,
height_max = 5,
})