Skip to content

Commit

Permalink
add wanring for name= in standard unit filters.
Browse files Browse the repository at this point in the history
  • Loading branch information
gfgtdf committed Feb 23, 2016
1 parent 53190df commit 3683490
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/unit_filter.cpp
Expand Up @@ -231,6 +231,12 @@ bool basic_unit_filter_impl::matches(const unit & u, const map_location& loc, co

bool basic_unit_filter_impl::internal_matches_filter(const unit & u, const map_location& loc) const
{
//We don't support name= becasue it casues oos since it depends on the translations
//It is for example possible that 2 units have the same name in one lanugage but not in aother
//Also note that translations are currently broken in mp (see this http://gna.org/bugs/?22918 and related bugreports)
if (!vcfg["name"].empty()) {
ERR_CF << "'name' is not supported in standart unit filters\n";
}
if (!vcfg["id"].empty()) {
std::vector<std::string> id_list = utils::split(vcfg["id"]);
if (std::find(id_list.begin(), id_list.end(), u.id()) == id_list.end()) {
Expand Down

0 comments on commit 3683490

Please sign in to comment.