mirror of
https://github.com/minetest/minetest.git
synced 2024-11-09 17:23:45 +01:00
Warn about unsatisfied dependencies
This commit is contained in:
parent
5c1cb01936
commit
fd8b9a3a44
@ -979,6 +979,7 @@ static core::list<ModSpec> getMods(core::list<std::string> &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<ModSpec> getMods(core::list<std::string> &modspaths)
|
||||
mods_satisfied.push(mod2);
|
||||
}
|
||||
}
|
||||
// Check unsatisfied dependencies
|
||||
for(core::list<ModSpec>::Iterator i = mods_unsorted.begin();
|
||||
i != mods_unsorted.end(); i++){
|
||||
ModSpec mod = *i;
|
||||
if(mod.unsatisfied_depends.empty())
|
||||
continue;
|
||||
errorstream<<"mod \""<<mod.name
|
||||
<<"\" has unsatisfied dependencies:";
|
||||
for(std::set<std::string>::iterator
|
||||
i = mod.unsatisfied_depends.begin();
|
||||
i != mod.unsatisfied_depends.end(); i++){
|
||||
errorstream<<" \""<<(*i)<<"\"";
|
||||
}
|
||||
errorstream<<". Loading nevertheless."<<std::endl;
|
||||
mods_sorted.push_back(mod);
|
||||
}
|
||||
return mods_sorted;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user