Luanti 5.15.0-dev
 
Loading...
Searching...
No Matches
MapgenParams Struct Reference

#include <mapgen.h>

+ Inheritance diagram for MapgenParams:
+ Collaboration diagram for MapgenParams:

Public Member Functions

 MapgenParams ()=default
 
virtual ~MapgenParams ()
 
virtual void readParams (const Settings *settings)
 
virtual void writeParams (Settings *settings) const
 
virtual void setDefaultSettings (Settings *settings)
 
s32 getSpawnRangeMax ()
 

Public Attributes

MapgenType mgtype = MAPGEN_DEFAULT
 
v3s16 chunksize = v3s16(5)
 
u64 seed = 0
 
s16 water_level = 1
 
s16 mapgen_limit = MAX_MAP_GENERATION_LIMIT
 
u32 flags = 0
 
u32 spflags = 0
 
BiomeParamsbparams = nullptr
 

Static Public Attributes

static constexpr u32 MAX_CHUNK_VOLUME = 2000
 

Constructor & Destructor Documentation

◆ MapgenParams()

MapgenParams::MapgenParams ( )
default

◆ ~MapgenParams()

MapgenParams::~MapgenParams ( )
virtual

References bparams.

Member Function Documentation

◆ getSpawnRangeMax()

s32 MapgenParams::getSpawnRangeMax ( )

References chunksize, get_mapgen_edges(), and mapgen_limit.

Referenced by Server::findSpawnPos().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ readParams()

void MapgenParams::readParams ( const Settings * settings)
virtual

Reimplemented in MapgenCarpathianParams, MapgenFlatParams, MapgenFractalParams, MapgenSinglenodeParams, MapgenV5Params, MapgenV6Params, MapgenV7Params, and MapgenValleysParams.

References BIOMEGEN_ORIGINAL, bparams, chunksize, BiomeManager::createBiomeParams(), errorstream, flagdesc_mapgen, flags, g_settings, Mapgen::getMapgenType(), is_number(), MAPGEN_DEFAULT, MAPGEN_INVALID, mapgen_limit, MAX_CHUNK_VOLUME, mgtype, myrand_bytes(), rangelim(), read_seed(), BiomeParams::readParams(), BiomeParams::seed, seed, settings, stoi, str_to_v3f(), and water_level.

Referenced by MapSettingsManager::makeMapgenParamsCopy().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setDefaultSettings()

virtual void MapgenParams::setDefaultSettings ( Settings * settings)
inlinevirtual

Reimplemented in MapgenCarpathianParams, MapgenFlatParams, MapgenFractalParams, MapgenV5Params, MapgenV6Params, MapgenV7Params, and MapgenValleysParams.

Referenced by Mapgen::setDefaultSettings().

+ Here is the caller graph for this function:

◆ writeParams()

void MapgenParams::writeParams ( Settings * settings) const
virtual

Reimplemented in MapgenCarpathianParams, MapgenFlatParams, MapgenFractalParams, MapgenSinglenodeParams, MapgenV5Params, MapgenV6Params, MapgenV7Params, and MapgenValleysParams.

References bparams, chunksize, flagdesc_mapgen, flags, Mapgen::getMapgenName(), mapgen_limit, mgtype, seed, settings, water_level, and BiomeParams::writeParams().

Referenced by MapSettingsManager::saveMapMeta().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ bparams

◆ chunksize

◆ flags

◆ mapgen_limit

s16 MapgenParams::mapgen_limit = MAX_MAP_GENERATION_LIMIT

◆ MAX_CHUNK_VOLUME

u32 MapgenParams::MAX_CHUNK_VOLUME = 2000
staticconstexpr

Referenced by readParams().

◆ mgtype

◆ seed

◆ spflags

◆ water_level


The documentation for this struct was generated from the following files: