1
0
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:
DjWarmonger
2014-07-07 16:20:48 +02:00
parent 4cea0a2973
commit ced3d32f3f
3 changed files with 26 additions and 3 deletions

View File

@@ -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;
}