1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

First step at unifying game identifiers code

This commit is contained in:
Ivan Savenko
2023-08-18 13:38:19 +03:00
parent b0eec85aca
commit ec8d31bbfc
34 changed files with 294 additions and 261 deletions

View File

@@ -374,15 +374,15 @@ void ZoneOptions::serializeJson(JsonSerializeFormat & handler)
if(terrainTypeLikeZone == NO_ZONE)
{
handler.serializeIdArray<TerrainId, TerrainID>("terrainTypes", terrainTypes, std::set<TerrainId>());
handler.serializeIdArray<TerrainId, TerrainID>("bannedTerrains", bannedTerrains, std::set<TerrainId>());
handler.serializeIdArray("terrainTypes", terrainTypes);
handler.serializeIdArray("bannedTerrains", bannedTerrains);
}
handler.serializeBool("townsAreSameType", townsAreSameType, false);
handler.serializeIdArray<FactionID>("allowedMonsters", monsterTypes, std::set<FactionID>());
handler.serializeIdArray<FactionID>("bannedMonsters", bannedMonsters, std::set<FactionID>());
handler.serializeIdArray<FactionID>("allowedTowns", townTypes, std::set<FactionID>());
handler.serializeIdArray<FactionID>("bannedTowns", bannedTownTypes, std::set<FactionID>());
handler.serializeIdArray("allowedMonsters", monsterTypes);
handler.serializeIdArray("bannedMonsters", bannedMonsters);
handler.serializeIdArray("allowedTowns", townTypes);
handler.serializeIdArray("bannedTowns", bannedTownTypes);
{
//TODO: add support for std::map to serializeEnum