Last night's work
All checks were successful
Error Check / luacheck_errcheck (push) Successful in 43s
Unit Tests / busted_unit_test (push) Successful in 49s

This commit is contained in:
DesertMermaid 2024-12-12 12:35:15 -08:00
parent a260c4a33a
commit 1708e2d461
45 changed files with 1359 additions and 1347 deletions

View file

@ -13,7 +13,4 @@
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")
--dofile(core.get_modpath(core.get_current_modname()) .. "/registry.lua")

View file

@ -10,182 +10,88 @@
-- 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({
-- Grassland
-- Typical Blocks: Grass Block, Dirt, Stone
core.register_biome({
name = "grassland",
node_top = "vox_worldblocks:grass",
--node_dust = "vox_main:dirt",
-- Node dropped onto upper surface after all else is generated
node_top = "vox_main:grass_block",
depth_top = 1,
node_filler = "vox_worldblocks:dirt",
-- Node forming surface layer of biome and thickness of this layer
node_filler = "vox_main:dirt",
depth_filler = 3,
heat_point = 35,
humidity_point = 50,
})
-- Node forming lower layer of biome and thickness of this layer
-- 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,
})
node_stone = "vox_main:stone",
-- Node that replaces all stone nodes between roughly y_min and y_max.
-- 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,
})
node_water_top = "vox_main:sand",
depth_water_top = 10,
-- Node forming a surface layer in seawater with the defined thickness
-- 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,
})
node_water = "",
-- Node that replaces all seawater nodes not in the surface layer
node_river_water = "vox_main:sand",
-- Node that replaces river water in mapgens that use
-- vox_main:river_water
node_riverbed = "vox_main:gravel",
depth_riverbed = 2,
-- Node placed under river water and thickness of this layer
node_cave_liquid = "vox_main:lava_source",
node_cave_liquid = {"vox_main:water_source", "vox_main:lava_source"},
-- Nodes placed inside 50% of the medium size caves.
-- Multiple nodes can be specified, each cave will use a randomly
-- chosen node from the list.
-- If this field is left out or 'nil', cave liquids fall back to
-- classic behavior of lava and water distributed using 3D noise.
-- For no cave liquid, specify "air".
node_dungeon = "vox_main:cobblestone",
-- Node used for primary dungeon structure.
-- If absent, dungeon nodes fall back to the 'mapgen_cobble' mapgen
-- alias, if that is also absent, dungeon nodes fall back to the biome
-- 'node_stone'.
-- If present, the following two nodes are also used.
node_dungeon_alt = "vox_main:mossycobble",
-- Node used for randomly-distributed alternative structure nodes.
-- If alternative structure nodes are not wanted leave this absent.
node_dungeon_stair = "vox_structural:cobblestone_stairs",
-- Node used for dungeon stairs.
-- If absent, stairs fall back to 'node_dungeon'.
y_max = 31000,
y_min = 1,
-- Upper and lower limits for biome.
-- Alternatively you can use xyz limits as shown below.
max_pos = {x = 31000, y = 128, z = 31000},
min_pos = {x = -31000, y = 9, z = -31000},
-- xyz limits for biome, an alternative to using 'y_min' and 'y_max'.
-- Biome is limited to a cuboid defined by these positions.
-- Any x, y or z field left undefined defaults to -31000 in 'min_pos' or
-- 31000 in 'max_pos'.
vertical_blend = 8,
-- 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,
})
-- Characteristic temperature and humidity for the biome.
-- These values create 'biome points' on a voronoi diagram with heat and
-- humidity as axes. The resulting voronoi cells determine the
-- distribution of the biomes.
-- Heat and humidity have average values of 50, vary mostly between
-- 0 and 100 but can exceed these values.
-- 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,
})
weight = 1.0,
-- Relative weight of the biome in the Voronoi diagram.
-- A value of 0 (or less) is ignored and equivalent to 1.0.
});