mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Random map generator refactoring (#762)
random map generator refactoring and improvements
This commit is contained in:
committed by
Andrii Danylchenko
parent
804f1bf3f2
commit
4bd0ff680a
@@ -252,6 +252,11 @@ void ZoneOptions::setMonsterTypes(const std::set<TFaction> & value)
|
||||
monsterTypes = value;
|
||||
}
|
||||
|
||||
const std::set<TFaction> & ZoneOptions::getMonsterTypes() const
|
||||
{
|
||||
return monsterTypes;
|
||||
}
|
||||
|
||||
void ZoneOptions::setMinesInfo(const std::map<TResource, ui16> & value)
|
||||
{
|
||||
mines = value;
|
||||
@@ -302,6 +307,26 @@ std::vector<TRmgTemplateZoneId> ZoneOptions::getConnections() const
|
||||
return connections;
|
||||
}
|
||||
|
||||
bool ZoneOptions::areTownsSameType() const
|
||||
{
|
||||
return townsAreSameType;
|
||||
}
|
||||
|
||||
bool ZoneOptions::isMatchTerrainToTown() const
|
||||
{
|
||||
return matchTerrainToTown;
|
||||
}
|
||||
|
||||
const ZoneOptions::CTownInfo & ZoneOptions::getPlayerTowns() const
|
||||
{
|
||||
return playerTowns;
|
||||
}
|
||||
|
||||
const ZoneOptions::CTownInfo & ZoneOptions::getNeutralTowns() const
|
||||
{
|
||||
return neutralTowns;
|
||||
}
|
||||
|
||||
void ZoneOptions::serializeJson(JsonSerializeFormat & handler)
|
||||
{
|
||||
static const std::vector<std::string> zoneTypes =
|
||||
@@ -421,6 +446,11 @@ int ZoneConnection::getGuardStrength() const
|
||||
{
|
||||
return guardStrength;
|
||||
}
|
||||
|
||||
bool operator==(const ZoneConnection & l, const ZoneConnection & r)
|
||||
{
|
||||
return l.zoneA == r.zoneA && l.zoneB == r.zoneB && l.guardStrength == r.guardStrength;
|
||||
}
|
||||
|
||||
void ZoneConnection::serializeJson(JsonSerializeFormat & handler)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user