mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Prevent loading a world with unresolved dependencies (#12542)
This commit is contained in:
parent
8c29c4f620
commit
2d10fa7867
5 changed files with 23 additions and 15 deletions
|
@ -425,14 +425,10 @@ void Server::init()
|
|||
|
||||
m_modmgr = std::make_unique<ServerModManager>(m_path_world);
|
||||
std::vector<ModSpec> unsatisfied_mods = m_modmgr->getUnsatisfiedMods();
|
||||
|
||||
// complain about mods with unsatisfied dependencies
|
||||
if (!m_modmgr->isConsistent()) {
|
||||
m_modmgr->printUnsatisfiedModsError();
|
||||
|
||||
warningstream
|
||||
<< "You have unsatisfied dependencies, loading your world anyway. "
|
||||
<< "This will become a fatal error in the future." << std::endl;
|
||||
std::string error = m_modmgr->getUnsatisfiedModsError();
|
||||
throw ServerError(error);
|
||||
}
|
||||
|
||||
//lock environment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue