summaryrefslogtreecommitdiffstats
path: root/src/Generating/ComposableGenerator.cpp
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-29 17:46:57 +0200
committerMattes D <github@xoft.cz>2014-07-29 17:46:57 +0200
commit8287f2d93354a584bb44216b4b59d28d9a5f0fb2 (patch)
tree767b4c95a3ce907cb1f6162450c10dca39518e7a /src/Generating/ComposableGenerator.cpp
parentDistortedHeightmap: Now generates gravel in deep ocean. (diff)
parentAdded a missing include for abs(float). (diff)
downloadcuberite-8287f2d93354a584bb44216b4b59d28d9a5f0fb2.tar
cuberite-8287f2d93354a584bb44216b4b59d28d9a5f0fb2.tar.gz
cuberite-8287f2d93354a584bb44216b4b59d28d9a5f0fb2.tar.bz2
cuberite-8287f2d93354a584bb44216b4b59d28d9a5f0fb2.tar.lz
cuberite-8287f2d93354a584bb44216b4b59d28d9a5f0fb2.tar.xz
cuberite-8287f2d93354a584bb44216b4b59d28d9a5f0fb2.tar.zst
cuberite-8287f2d93354a584bb44216b4b59d28d9a5f0fb2.zip
Diffstat (limited to '')
-rw-r--r--src/Generating/ComposableGenerator.cpp36
1 files changed, 33 insertions, 3 deletions
diff --git a/src/Generating/ComposableGenerator.cpp b/src/Generating/ComposableGenerator.cpp
index ab6accee7..0d9bedf45 100644
--- a/src/Generating/ComposableGenerator.cpp
+++ b/src/Generating/ComposableGenerator.cpp
@@ -26,6 +26,7 @@
#include "POCPieceGenerator.h"
#include "RainbowRoadsGen.h"
#include "Ravines.h"
+#include "RoughRavines.h"
#include "TestRailsGen.h"
#include "UnderwaterBaseGen.h"
#include "VillageGen.h"
@@ -397,16 +398,45 @@ void cComposableGenerator::InitFinishGens(cIniFile & a_IniFile)
}
else if (NoCaseCompare(*itr, "RainbowRoads") == 0)
{
- int GridSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsGridSize", 512);
+ int GridSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsGridSize", 512);
int MaxOffset = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxOffset", 128);
- int MaxDepth = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxDepth", 30);
- int MaxSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxSize", 260);
+ int MaxDepth = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxDepth", 30);
+ int MaxSize = a_IniFile.GetValueSetI("Generator", "RainbowRoadsMaxSize", 260);
m_FinishGens.push_back(new cRainbowRoadsGen(Seed, GridSize, MaxOffset, MaxDepth, MaxSize));
}
else if (NoCaseCompare(*itr, "Ravines") == 0)
{
m_FinishGens.push_back(new cStructGenRavines(Seed, 128));
}
+ else if (NoCaseCompare(*itr, "RoughRavines") == 0)
+ {
+ int GridSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesGridSize", 256);
+ int MaxOffset = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxOffset", 128);
+ int MaxSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesMaxSize", 128);
+ int MinSize = a_IniFile.GetValueSetI("Generator", "RoughRavinesMinSize", 64);
+ double MaxCenterWidth = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxCenterWidth", 8);
+ double MinCenterWidth = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinCenterWidth", 2);
+ double MaxRoughness = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxRoughness", 0.2);
+ double MinRoughness = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinRoughness", 0.05);
+ double MaxFloorHeightEdge = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxFloorHeightEdge", 8);
+ double MinFloorHeightEdge = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinFloorHeightEdge", 30);
+ double MaxFloorHeightCenter = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxFloorHeightCenter", 20);
+ double MinFloorHeightCenter = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinFloorHeightCenter", 6);
+ double MaxCeilingHeightEdge = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxCeilingHeightEdge", 56);
+ double MinCeilingHeightEdge = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinCeilingHeightEdge", 38);
+ double MaxCeilingHeightCenter = a_IniFile.GetValueSetF("Generator", "RoughRavinesMaxCeilingHeightCenter", 58);
+ double MinCeilingHeightCenter = a_IniFile.GetValueSetF("Generator", "RoughRavinesMinCeilingHeightCenter", 36);
+ m_FinishGens.push_back(new cRoughRavines(
+ Seed, MaxSize, MinSize,
+ (float)MaxCenterWidth, (float)MinCenterWidth,
+ (float)MaxRoughness, (float)MinRoughness,
+ (float)MaxFloorHeightEdge, (float)MinFloorHeightEdge,
+ (float)MaxFloorHeightCenter, (float)MinFloorHeightCenter,
+ (float)MaxCeilingHeightEdge, (float)MinCeilingHeightEdge,
+ (float)MaxCeilingHeightCenter, (float)MinCeilingHeightCenter,
+ GridSize, MaxOffset
+ ));
+ }
else if (NoCaseCompare(*itr, "Snow") == 0)
{
m_FinishGens.push_back(new cFinishGenSnow);