mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Add system message about mods incompatibility
This commit is contained in:
@@ -2967,7 +2967,7 @@ void CGameHandler::save(const std::string & filename)
|
||||
}
|
||||
}
|
||||
|
||||
void CGameHandler::load(const std::string & filename)
|
||||
bool CGameHandler::load(const std::string & filename)
|
||||
{
|
||||
logGlobal->info("Loading from %s", filename);
|
||||
const auto stem = FileInfo::GetPathStem(filename);
|
||||
@@ -2984,12 +2984,20 @@ void CGameHandler::load(const std::string & filename)
|
||||
}
|
||||
logGlobal->info("Game has been successfully loaded!");
|
||||
}
|
||||
catch(std::exception &e)
|
||||
catch(const CModHandler::Incompatibility & e)
|
||||
{
|
||||
logGlobal->error("Failed to load game: %s", e.what());
|
||||
lobby->announceMessage(e.what());
|
||||
return false;
|
||||
}
|
||||
catch(const std::exception & e)
|
||||
{
|
||||
logGlobal->error("Failed to load game: %s", e.what());
|
||||
return false;
|
||||
}
|
||||
gs->preInit(VLC);
|
||||
gs->updateOnLoad(lobby->si.get());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CGameHandler::bulkSplitStack(SlotID slotSrc, ObjectInstanceID srcOwner, si32 howMany)
|
||||
|
||||
Reference in New Issue
Block a user