From: Perttu Ahola Date: Sun, 27 Nov 2011 11:03:54 +0000 (+0200) Subject: Warn about unsatisfied dependencies X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=fd8b9a3a44cadc048a32e0a6189a59716c2432d1;p=zefram%2Fminetest%2Fminetest_engine.git Warn about unsatisfied dependencies --- diff --git a/src/server.cpp b/src/server.cpp index 58611bed..f3e497ff 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -979,6 +979,7 @@ static core::list getMods(core::list &modspaths) mods_satisfied.push(spec); } } + // Sort by depencencies while(!mods_satisfied.empty()){ ModSpec mod = mods_satisfied.front(); mods_satisfied.pop(); @@ -994,6 +995,22 @@ static core::list getMods(core::list &modspaths) mods_satisfied.push(mod2); } } + // Check unsatisfied dependencies + for(core::list::Iterator i = mods_unsorted.begin(); + i != mods_unsorted.end(); i++){ + ModSpec mod = *i; + if(mod.unsatisfied_depends.empty()) + continue; + errorstream<<"mod \""<::iterator + i = mod.unsatisfied_depends.begin(); + i != mod.unsatisfied_depends.end(); i++){ + errorstream<<" \""<<(*i)<<"\""; + } + errorstream<<". Loading nevertheless."<