1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

Use error messages from H3

This commit is contained in:
Ivan Savenko 2023-09-12 21:34:58 +03:00
parent b9b51334eb
commit 935a18f077

View File

@ -71,7 +71,7 @@ std::string StartInfo::getCampaignName() const
void LobbyInfo::verifyStateBeforeStart(bool ignoreNoHuman) const
{
if(!mi || !mi->mapHeader)
throw std::domain_error("There is no map to start!");
throw std::domain_error(VLC->generaltexth->translate("core.genrltxt.529"));
auto missingMods = CMapService::verifyMapHeaderMods(*mi->mapHeader);
CModHandler::Incompatibility::ModList modList;
@ -88,12 +88,12 @@ void LobbyInfo::verifyStateBeforeStart(bool ignoreNoHuman) const
break;
if(i == si->playerInfos.cend() && !ignoreNoHuman)
throw std::domain_error("There is no human player on map");
throw std::domain_error(VLC->generaltexth->translate("core.genrltxt.530"));
if(si->mapGenOptions && si->mode == StartInfo::NEW_GAME)
{
if(!si->mapGenOptions->checkOptions())
throw std::domain_error("No random map template found!");
throw std::domain_error(VLC->generaltexth->translate("core.genrltxt.751"));
}
}