QcDungeonGenerator Class
Builds the dungeons of the terrain generator into its chunks (decision E-522): each chunk writes its own cells of every dungeon whose plan touches it (QcDungeonPlanner, plans cached by region), in any order with the same result. More...
| Header: | #include <worldgen/dungeons/QcDungeonGenerator.h> |
Public Functions
| void | build(QcChunk &chunk) const |
| QcChunkFurnishing | furnishingIn(QcChunkPos pos) const |
| std::shared_ptr<const QcDungeonPlan> | planOf(int regionX, int regionZ) const |
| const QcDungeonPlanner & | planner() const |
| QList<std::shared_ptr<const QcDungeonPlan>> | plansTouching(QcChunkPos pos) const |
Detailed Description
The room is a shell of wall and moss blocks around air; the corridors' lining replaces only what is not rock (cave air, liquids, earth), then the corridors are carved (liquid beside them sealed with wall) and the spawner, chests and lights placed. The chests' loot and the spawner's kind come with furnishingIn(). Thread-safe.
Member Function Documentation
void QcDungeonGenerator::build(QcChunk &chunk) const
Writes the cells of the dungeons touching chunk into it.
QcChunkFurnishing QcDungeonGenerator::furnishingIn(QcChunkPos pos) const
Returns the spawners (with their creature) and the chests (with the loot table and a seed) of the dungeons in the chunk pos.
std::shared_ptr<const QcDungeonPlan> QcDungeonGenerator::planOf(int regionX, int regionZ) const
Returns the plan of the region regionX, regionZ, planned once (null without a dungeon).
const QcDungeonPlanner &QcDungeonGenerator::planner() const
Returns the planner whose dungeons this generator builds.
QList<std::shared_ptr<const QcDungeonPlan>> QcDungeonGenerator::plansTouching(QcChunkPos pos) const
Returns the dungeons whose cells may lie in the chunk pos.