mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Scale dwelling / pandora with creatures value according to number of native zones.
This commit is contained in:
@@ -25,7 +25,7 @@ void CMapGenerator::foreach_neighbour(const int3 &pos, std::function<void(int3&
|
||||
|
||||
|
||||
CMapGenerator::CMapGenerator(shared_ptr<CMapGenOptions> mapGenOptions, int RandomSeed /*= std::time(nullptr)*/) :
|
||||
mapGenOptions(mapGenOptions), randomSeed(RandomSeed), monolithIndex(0)
|
||||
mapGenOptions(mapGenOptions), randomSeed(RandomSeed), monolithIndex(0), zonesTotal(0)
|
||||
{
|
||||
rand.setSeed(randomSeed);
|
||||
}
|
||||
@@ -435,3 +435,17 @@ int CMapGenerator::getNextMonlithIndex()
|
||||
else
|
||||
return monolithIndex++;
|
||||
}
|
||||
|
||||
void CMapGenerator::registerZone (TFaction faction)
|
||||
{
|
||||
zonesPerFaction[faction]++;
|
||||
zonesTotal++;
|
||||
}
|
||||
ui32 CMapGenerator::getZoneCount(TFaction faction)
|
||||
{
|
||||
return zonesPerFaction[faction];
|
||||
}
|
||||
ui32 CMapGenerator::getTotalZoneCount() const
|
||||
{
|
||||
return zonesTotal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user