1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-07 00:58:39 +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

@ -16,13 +16,14 @@
#include "../lib/serializer/Connection.h"
#include "../lib/CGeneralTextHandler.h"
#include "../lib/CHeroHandler.h"
#include "../lib/CModHandler.h"
#include "../lib/CPlayerState.h"
#include "../lib/GameConstants.h"
#include "../lib/NetPacks.h"
#include "../lib/StartInfo.h"
#include "../lib/gameState/CGameState.h"
#include "../lib/mapObjects/CGTownInstance.h"
#include "../lib/modding/IdentifierStorage.h"
#include "../lib/modding/ModScope.h"
PlayerMessageProcessor::PlayerMessageProcessor()
:gameHandler(nullptr)
@ -179,7 +180,7 @@ void PlayerMessageProcessor::cheatGiveArmy(PlayerColor player, const CGHeroInsta
{
}
std::optional<int32_t> creatureId = VLC->modh->identifiers.getIdentifier(CModHandler::scopeGame(), "creature", creatureIdentifier, false);
std::optional<int32_t> creatureId = VLC->identifiers()->getIdentifier(ModScope::scopeGame(), "creature", creatureIdentifier, false);
if(creatureId.has_value())
{