1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Random map generator refactoring (#762)

random map generator refactoring and improvements
This commit is contained in:
Nordsoft91
2022-08-09 09:54:32 +04:00
committed by Andrii Danylchenko
parent 804f1bf3f2
commit 4bd0ff680a
60 changed files with 6721 additions and 4552 deletions

View File

@ -208,6 +208,7 @@ void CMapGenOptions::setMapTemplate(const CRmgTemplate * value)
void CMapGenOptions::finalize(CRandomGenerator & rand)
{
logGlobal->info("RMG map: %dx%d, %s underground", getWidth(), getHeight(), getHasTwoLevels() ? "WITH" : "NO");
logGlobal->info("RMG settings: players %d, teams %d, computer players %d, computer teams %d, water %d, monsters %d",
static_cast<int>(getPlayerCount()), static_cast<int>(getTeamCount()), static_cast<int>(getCompOnlyPlayerCount()),
static_cast<int>(getCompOnlyTeamCount()), static_cast<int>(getWaterContent()), static_cast<int>(getMonsterStrength()));
@ -217,6 +218,8 @@ void CMapGenOptions::finalize(CRandomGenerator & rand)
mapTemplate = getPossibleTemplate(rand);
}
assert(mapTemplate);
logGlobal->info("RMG template name: %s", mapTemplate->getName());
if (getPlayerCount() == RANDOM_SIZE)
{