summaryrefslogtreecommitdiffstats
path: root/src/Generating/DungeonRoomsFinisher.h
diff options
context:
space:
mode:
authorAlexander Harkness <bearbin@gmail.com>2014-10-11 19:32:21 +0200
committerAlexander Harkness <bearbin@gmail.com>2014-10-11 19:32:21 +0200
commit93833069a80fe4aec33a95148df39ad40671ddaf (patch)
tree2e6a335a60e618b5fe456ca8a586a2c5448c8c87 /src/Generating/DungeonRoomsFinisher.h
parentReverted submodule changes. (diff)
parentMerge pull request #1528 from kjanku1/master (diff)
downloadcuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar
cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar.gz
cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar.bz2
cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar.lz
cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar.xz
cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.tar.zst
cuberite-93833069a80fe4aec33a95148df39ad40671ddaf.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;
+} ;
+
+
+
+