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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user