mirror of
https://gitlab.com/gaelysam/mapgen_rivers.git
synced 2024-11-13 06:10:21 +01:00
Make map size a setting
This commit is contained in:
parent
31c5ea1025
commit
db33e58f0a
|
@ -11,8 +11,8 @@ dofile(modpath .. 'load.lua')
|
|||
|
||||
mapgen_rivers.grid = {}
|
||||
|
||||
local X = 1000
|
||||
local Z = 1000
|
||||
local X = mapgen_rivers.settings.grid_x_size
|
||||
local Z = mapgen_rivers.settings.grid_z_size
|
||||
|
||||
local function offset_converter(o)
|
||||
return (o + 0.5) * (1/256)
|
||||
|
|
|
@ -72,6 +72,8 @@ mapgen_rivers.settings = {
|
|||
glacier_factor = def_setting('glacier_factor', 'number', 8),
|
||||
elevation_chill = def_setting('elevation_chill', 'number', 0.25),
|
||||
|
||||
grid_x_size = def_setting('grid_x_size', 'number', 1000),
|
||||
grid_z_size = def_setting('grid_z_size', 'number', 1000),
|
||||
evol_params = {
|
||||
K = def_setting('river_erosion_coef', 'number', 0.5),
|
||||
m = def_setting('river_erosion_power', 'number', 0.4),
|
||||
|
|
|
@ -9,6 +9,14 @@ mapgen_rivers_center (Center map) bool true
|
|||
# the actual size of the map will be 12000.
|
||||
mapgen_rivers_blocksize (Block size) float 15.0 2.0 100.0
|
||||
|
||||
# X size of the grid being generated
|
||||
# Actual size of the map is grid_x_size * blocksize
|
||||
mapgen_rivers_grid_x_size (Grid X size) int 1000 50 5000
|
||||
|
||||
# Z size of the grid being generated
|
||||
# Actual size of the map is grid_z_size * blocksize
|
||||
mapgen_rivers_grid_z_size (Grid Z size) int 1000 50 5000
|
||||
|
||||
# Minimal catchment area for a river to be drawn, in square nodes
|
||||
# Lower value means bigger river density
|
||||
mapgen_rivers_min_catchment (Minimal catchment area) float 3600.0 100.0 1000000.0
|
||||
|
|
Loading…
Reference in New Issue
Block a user