Fix small error in previous commit and...
...restore WML warning about missing png extension
This commit is contained in:
parent
c2f75aba4e
commit
1b6fc9391b
1 changed files with 9 additions and 6 deletions
|
@ -326,14 +326,17 @@ bool terrain_builder::rule_valid(const building_rule &rule) const
|
|||
// but only for filenames not using ".."
|
||||
bool precached = s.find("..") == std::string::npos;
|
||||
s = "terrain/" + s;
|
||||
|
||||
if(precached) {
|
||||
//TODO reactivate this (costly) warning
|
||||
//if precached_file_exists(s+".png")
|
||||
// lg::wml_error << "Terrain image '" << s << "' misses the '.png' extension\n";
|
||||
return image::precached_file_exists(s);
|
||||
} else {
|
||||
return image::exists(s);
|
||||
if(image::precached_file_exists(s))
|
||||
continue;
|
||||
} else if (image::exists(s)){
|
||||
continue;
|
||||
}
|
||||
if(s.find(".png") == std::string::npos){
|
||||
lg::wml_error << "Terrain image '" << s << "' misses the '.png' extension\n";
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue