summaryrefslogtreecommitdiffstats
path: root/src/Generating/DungeonRoomsFinisher.h
diff options
context:
space:
mode:
authorMasy98 <masy@antheruscraft.de>2014-08-30 21:31:51 +0200
committerMasy98 <masy@antheruscraft.de>2014-08-30 21:31:51 +0200
commit2d5a38bd61aa9436f2944f26344b14f92e30f025 (patch)
treed1caaf6446574ffdf676c272e39404ed8184a33b /src/Generating/DungeonRoomsFinisher.h
parentFixed slab name (diff)
parentcChunk: Fixed the Coords param. (diff)
downloadcuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar.gz
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar.bz2
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar.lz
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar.xz
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.tar.zst
cuberite-2d5a38bd61aa9436f2944f26344b14f92e30f025.zip
Diffstat (limited to 'src/Generating/DungeonRoomsFinisher.h')
-rw-r--r--src/Generating/DungeonRoomsFinisher.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/Generating/DungeonRoomsFinisher.h b/src/Generating/DungeonRoomsFinisher.h
new file mode 100644
index 000000000..2b52c9de6
--- /dev/null
+++ b/src/Generating/DungeonRoomsFinisher.h
@@ -0,0 +1,52 @@
+
+// DungeonRoomsFinisher.h
+
+// Declares the cDungeonRoomsFinisher class representing the finisher that generates dungeon rooms
+
+
+
+
+
+#pragma once
+
+#include "GridStructGen.h"
+#include "../ProbabDistrib.h"
+
+
+
+
+
+class cDungeonRoomsFinisher :
+ public cGridStructGen
+{
+ typedef cGridStructGen super;
+
+public:
+ /** Creates a new dungeon room finisher.
+ a_HeightGen is the underlying height generator, so that the rooms can always be placed under the terrain.
+ a_MaxSize and a_MinSize are the maximum and minimum sizes of the room's internal (air) area, in blocks across.
+ a_HeightDistrib is the string defining the height distribution for the rooms (cProbabDistrib format). */
+ cDungeonRoomsFinisher(cTerrainHeightGen & a_HeightGen, int a_Seed, int a_GridSize, int a_MaxSize, int a_MinSize, const AString & a_HeightDistrib);
+
+protected:
+
+ /** The height gen that is used for limiting the rooms' Y coords */
+ cTerrainHeightGen & m_HeightGen;
+
+ /** Maximum half-size (from center to wall) of the dungeon room's inner (air) area. Default is 3 (vanilla). */
+ int m_MaxHalfSize;
+
+ /** Minimum half-size (from center to wall) of the dungeon room's inner (air) area. Default is 2 (vanilla). */
+ int m_MinHalfSize;
+
+ /** The height probability distribution to make the spawners more common in layers 10 - 40, less common outside this range. */
+ cProbabDistrib m_HeightProbability;
+
+
+ // cGridStructGen overrides:
+ virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override;
+} ;
+
+
+
+