Use the blank-attack image instead of no image at all (in attack dialog).
I suppose it looks better. It's a simple fix for the problem of using an invalid file. This also fix the error message in the standard ouput spotted in bug #9570
This commit is contained in:
parent
81c7cb763f
commit
3695a0de78
1 changed files with 6 additions and 2 deletions
|
@ -61,8 +61,12 @@ attack_type::attack_type(const config& cfg,const std::string& id, const std::str
|
|||
|
||||
type_ = cfg["type"];
|
||||
icon_ = cfg["icon"];
|
||||
if(icon_.empty())
|
||||
icon_ = "attacks/" + id_ + ".png";
|
||||
if(icon_.empty()){
|
||||
if (id_ != "")
|
||||
icon_ = "attacks/" + id_ + ".png";
|
||||
else
|
||||
icon_ = "attacks/blank-attack.png";
|
||||
}
|
||||
|
||||
range_ = cfg["range"].value();
|
||||
damage_ = atol(cfg["damage"].c_str());
|
||||
|
|
Loading…
Add table
Reference in a new issue