Luanti 5.10.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
 
s16 chunksize = 5
 
u64 seed = 0
 
s16 water_level = 1
 
s16 mapgen_limit = MAX_MAP_GENERATION_LIMIT
 
u32 flags = 0
 
u32 spflags = 0
 
BiomeParamsbparams = nullptr
 
s16 mapgen_edge_min = -MAX_MAP_GENERATION_LIMIT
 
s16 mapgen_edge_max = MAX_MAP_GENERATION_LIMIT
 

Private Attributes

bool m_mapgen_edges_calculated = false
 

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(), m_mapgen_edges_calculated, mapgen_edge_max, mapgen_edge_min, mapgen_limit, and MYMIN.

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(), flagdesc_mapgen, flags, g_settings, Mapgen::getMapgenType(), MAPGEN_DEFAULT, MAPGEN_INVALID, mapgen_limit, mgtype, myrand_bytes(), rangelim, read_seed(), BiomeParams::readParams(), BiomeParams::seed, seed, settings, and water_level.

Referenced by MapSettingsManager::makeMapgenParams().

+ 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

◆ m_mapgen_edges_calculated

bool MapgenParams::m_mapgen_edges_calculated = false
private

Referenced by getSpawnRangeMax().

◆ mapgen_edge_max

s16 MapgenParams::mapgen_edge_max = MAX_MAP_GENERATION_LIMIT

Referenced by getSpawnRangeMax().

◆ mapgen_edge_min

s16 MapgenParams::mapgen_edge_min = -MAX_MAP_GENERATION_LIMIT

Referenced by getSpawnRangeMax().

◆ mapgen_limit

s16 MapgenParams::mapgen_limit = MAX_MAP_GENERATION_LIMIT

◆ mgtype

◆ seed

◆ spflags

◆ water_level


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