diff options
author | worktycho <work.tycho@gmail.com> | 2015-06-21 13:08:34 +0200 |
---|---|---|
committer | worktycho <work.tycho@gmail.com> | 2015-06-21 13:08:34 +0200 |
commit | 0096327c4ff8f69755a0ca438fcd08171e68c5d7 (patch) | |
tree | 7400062806953c5fc1d8abd3ab9eaa74800d4872 /src/Generating/VillageGen.h | |
parent | Merge pull request #2255 from cuberite/LoadablePieces (diff) | |
parent | Added basic support for loading village prefabs from files. (diff) | |
download | cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.gz cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.bz2 cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.lz cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.xz cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.tar.zst cuberite-0096327c4ff8f69755a0ca438fcd08171e68c5d7.zip |
Diffstat (limited to 'src/Generating/VillageGen.h')
-rw-r--r-- | src/Generating/VillageGen.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/Generating/VillageGen.h b/src/Generating/VillageGen.h index c384ed9e5..e7f9f2529 100644 --- a/src/Generating/VillageGen.h +++ b/src/Generating/VillageGen.h @@ -16,15 +16,34 @@ +// fwd: +class cVillagePiecePool; + + + + + class cVillageGen : public cGridStructGen { typedef cGridStructGen super; public: - cVillageGen(int a_Seed, int a_GridSize, int a_MaxOffset, int a_MaxDepth, int a_MaxSize, int a_MinDensity, int a_MaxDensity, cBiomeGenPtr a_BiomeGen, cTerrainHeightGenPtr a_HeightGen); + /** Creates a new instance of the generator with the specified parameters. */ + cVillageGen( + int a_Seed, + int a_GridSize, + int a_MaxOffset, + int a_MaxDepth, + int a_MaxSize, + int a_MinDensity, int a_MaxDensity, + cBiomeGenPtr a_BiomeGen, + cTerrainHeightGenPtr a_HeightGen, + const AStringVector & a_PrefabsToLoad + ); protected: class cVillage; // fwd: VillageGen.cpp + typedef std::vector<SharedPtr<cVillagePiecePool> > cVillagePiecePools; /** The noise used for generating random numbers */ cNoise m_Noise; @@ -47,6 +66,9 @@ protected: /** The underlying height generator, used to position the prefabs crossing chunk borders */ cTerrainHeightGenPtr m_HeightGen; + /** All available prefab sets. Each village gets one of these chosen randomly. */ + cVillagePiecePools m_Pools; + // cGridStructGen overrides: virtual cStructurePtr CreateStructure(int a_GridX, int a_GridZ, int a_OriginX, int a_OriginZ) override; |