1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Split massive CModHandler class/file into multiple parts:

- IdentifierStorage is now a separate handler in VLC
- Renamed ModHandler::Incompatibility exception to ModIncompatibility
- Extracted ModScope namespace from ModHandler
- Extracted ModUtilities namespace from ModHandler
- Split CModHandler.cpp on per-class basis
- Replaced some direct members with unique_ptr to reduce header includes
This commit is contained in:
Ivan Savenko
2023-07-30 20:12:25 +03:00
parent 8ea7e91189
commit 62fddca21e
101 changed files with 1532 additions and 1279 deletions

View File

@@ -11,13 +11,13 @@
#include "StartInfo.h"
#include "CGeneralTextHandler.h"
#include "CModHandler.h"
#include "VCMI_Lib.h"
#include "rmg/CMapGenOptions.h"
#include "mapping/CMapInfo.h"
#include "campaign/CampaignState.h"
#include "mapping/CMapHeader.h"
#include "mapping/CMapService.h"
#include "modding/ModIncompatibility.h"
VCMI_LIB_NAMESPACE_BEGIN
@@ -74,12 +74,12 @@ void LobbyInfo::verifyStateBeforeStart(bool ignoreNoHuman) const
throw std::domain_error("ExceptionMapMissing");
auto missingMods = CMapService::verifyMapHeaderMods(*mi->mapHeader);
CModHandler::Incompatibility::ModList modList;
ModIncompatibility::ModList modList;
for(const auto & m : missingMods)
modList.push_back({m.first, m.second.toString()});
if(!modList.empty())
throw CModHandler::Incompatibility(std::move(modList));
throw ModIncompatibility(std::move(modList));
//there must be at least one human player before game can be started
std::map<PlayerColor, PlayerSettings>::const_iterator i;