1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Optional dependencies and properly handle mod name conflicts again

This commit is contained in:
Kahrl 2013-05-03 23:58:22 +02:00
parent a031a15487
commit 969d2b3eb1
6 changed files with 324 additions and 169 deletions

View file

@ -407,14 +407,26 @@ bool GUIConfigureWorld::OnEvent(const SEvent& event)
delete[] text;
menu->drop();
ModConfiguration modconf(m_wspec.path);
if(!modconf.isConsistent())
try
{
wchar_t* text = wgettext("Warning: Configuration not consistent. ");
ModConfiguration modconf(m_wspec.path);
if(!modconf.isConsistent())
{
wchar_t* text = wgettext("Warning: Configuration not consistent. ");
GUIMessageMenu *menu =
new GUIMessageMenu(Environment, Parent, -1, m_menumgr,
text );
delete[] text;
menu->drop();
}
}
catch(ModError &err)
{
errorstream<<err.what()<<std::endl;
std::wstring text = narrow_to_wide(err.what()) + wgettext("\nCheck debug.txt for details.");
GUIMessageMenu *menu =
new GUIMessageMenu(Environment, Parent, -1, m_menumgr,
text );
delete[] text;
text );
menu->drop();
}