From 6aa7df367f8db7506a8a5ab853c26e3c9fd60253 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Thu, 22 May 2014 21:47:56 +0200 Subject: Villages have min and max density setting. Also made roads use 3+9 scheme, instead of 3+5, for the house connectors. Fixes #1020. --- src/Generating/VillageGen.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/Generating/VillageGen.h') diff --git a/src/Generating/VillageGen.h b/src/Generating/VillageGen.h index c6f8f024a..5faaae8a6 100644 --- a/src/Generating/VillageGen.h +++ b/src/Generating/VillageGen.h @@ -21,16 +21,25 @@ class cVillageGen : { typedef cGridStructGen super; public: - cVillageGen(int a_Seed, int a_GridSize, int a_MaxDepth, int a_MaxSize, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen); + cVillageGen(int a_Seed, int a_GridSize, int a_MaxDepth, int a_MaxSize, int a_MinDensity, int a_MaxDensity, cBiomeGen & a_BiomeGen, cTerrainHeightGen & a_HeightGen); protected: class cVillage; // fwd: VillageGen.cpp + /** The noise used for generating random numbers */ + cNoise m_Noise; + /** Maximum depth of the generator tree*/ int m_MaxDepth; /** Maximum size, in X/Z blocks, of the village (radius from the origin) */ int m_MaxSize; + + /** Minimum density - percentage of allowed house connections. Range [0, 100] */ + int m_MinDensity; + + /** Maximum density - percentage of allowed house connections. Range [0, 100] */ + int m_MaxDensity; /** The underlying biome generator that defines whether the village is created or not */ cBiomeGen & m_BiomeGen; -- cgit v1.2.3