QtCraft API C++ classes QML types Handbook

QcWorldgenCatalog Class

What the world generators build from (part of QcContentRegistry, server side only, not synchronised): biomes, features, ores and the terrain settings, the structures and the settings of the showcase, flat and void world types, and the options a world may set on them (decision E-917). More...

Header: #include <common/content/worldgen/QcWorldgenCatalog.h>

Public Functions

void addWorldOptions(const QcWorldOptionSet &set)
const QcBiomeDefinition *biome(const QString &name) const
const QList<QcBiomeDefinition> &biomes() const
const QList<QcFeatureDefinition> &features() const
const QcFlatDefinition &flatWorld() const
const QList<QcOreDefinition> &ores() const
void registerBiome(QcBiomeDefinition definition)
void registerFeature(QcFeatureDefinition definition)
void registerOre(QcOreDefinition definition)
void registerStructure(QcStructureDefinition structure)
void removeBiome(const QString &name)
void setFlatWorld(QcFlatDefinition flat)
void setShowcase(QcShowcaseDefinition showcase)
void setTerrainSettings(QcTerrainSettings settings)
void setVoidWorld(QcVoidDefinition empty)
const QcShowcaseDefinition &showcase() const
const QcStructureDefinition *structure(const QString &name) const
const QList<QcStructureDefinition> &structures() const
const QcTerrainSettings &terrainSettings() const
const QcVoidDefinition &voidWorld() const
const QcWorldOptionDefinition *worldOption(const QString &name) const
const QList<QcWorldOptionGroup> &worldOptionGroups() const
const QList<QcWorldOptionDefinition> &worldOptions() const
const QcWorldPreset *worldPreset(const QString &name) const
const QList<QcWorldPreset> &worldPresets() const

Detailed Description

Definitions are replaced by name, settings by a later pack.

Member Function Documentation

void QcWorldgenCatalog::addWorldOptions(const QcWorldOptionSet &set)

Adds the groups, options and presets of set, one pack's world generation options (decision E-917); an entry with the name of an existing one replaces it in its place. Called in the order of the packs and their files.

const QcBiomeDefinition *QcWorldgenCatalog::biome(const QString &name) const

Returns the biome named name; null when there is none.

const QList<QcBiomeDefinition> &QcWorldgenCatalog::biomes() const

Returns the biomes in registration order.

const QList<QcFeatureDefinition> &QcWorldgenCatalog::features() const

Returns the features in registration order.

const QcFlatDefinition &QcWorldgenCatalog::flatWorld() const

Returns the flat world settings.

See also setFlatWorld().

const QList<QcOreDefinition> &QcWorldgenCatalog::ores() const

Returns the ores in registration order.

void QcWorldgenCatalog::registerBiome(QcBiomeDefinition definition)

Adds the biome definition, or replaces the one of the same name in its place.

void QcWorldgenCatalog::registerFeature(QcFeatureDefinition definition)

Adds the feature definition, or replaces the one of the same name in its place.

void QcWorldgenCatalog::registerOre(QcOreDefinition definition)

Adds the ore definition, or replaces the one of the same name in its place.

void QcWorldgenCatalog::registerStructure(QcStructureDefinition structure)

Adds structure, or replaces the one of the same name in its place.

void QcWorldgenCatalog::removeBiome(const QString &name)

Removes the biome name, if there is one; the later ones move up.

void QcWorldgenCatalog::setFlatWorld(QcFlatDefinition flat)

Replaces the flat world settings with flat.

See also flatWorld().

void QcWorldgenCatalog::setShowcase(QcShowcaseDefinition showcase)

Replaces the showcase settings with showcase.

See also showcase().

void QcWorldgenCatalog::setTerrainSettings(QcTerrainSettings settings)

Replaces the terrain settings with settings.

See also terrainSettings().

void QcWorldgenCatalog::setVoidWorld(QcVoidDefinition empty)

Replaces the void world settings with empty.

See also voidWorld().

const QcShowcaseDefinition &QcWorldgenCatalog::showcase() const

Returns the showcase settings.

See also setShowcase().

const QcStructureDefinition *QcWorldgenCatalog::structure(const QString &name) const

Returns the structure named name; null when there is none.

const QList<QcStructureDefinition> &QcWorldgenCatalog::structures() const

Returns the structures in registration order.

const QcTerrainSettings &QcWorldgenCatalog::terrainSettings() const

Returns the terrain settings.

See also setTerrainSettings().

const QcVoidDefinition &QcWorldgenCatalog::voidWorld() const

Returns the void world settings.

See also setVoidWorld().

const QcWorldOptionDefinition *QcWorldgenCatalog::worldOption(const QString &name) const

Returns the option named name; null when there is none.

const QList<QcWorldOptionGroup> &QcWorldgenCatalog::worldOptionGroups() const

Returns the option groups in registration order.

const QList<QcWorldOptionDefinition> &QcWorldgenCatalog::worldOptions() const

Returns the options in registration order.

const QcWorldPreset *QcWorldgenCatalog::worldPreset(const QString &name) const

Returns the preset named name; null when there is none.

const QList<QcWorldPreset> &QcWorldgenCatalog::worldPresets() const

Returns the presets in registration order.