Log missing MissileType definition. (and ShowLoadProgress when loading succeed).
This commit is contained in:
parent
7458218ea0
commit
1def6cf12d
2 changed files with 21 additions and 1 deletions
|
@ -46,6 +46,7 @@ class MissileConfig
|
|||
public:
|
||||
MissileConfig() : Missile(NULL) {}
|
||||
|
||||
bool MapMissileNoLog();
|
||||
bool MapMissile();
|
||||
|
||||
public:
|
||||
|
|
|
@ -34,11 +34,30 @@
|
|||
#include "missileconfig.h"
|
||||
|
||||
#include "missile.h"
|
||||
#include "translate.h"
|
||||
#include "ui.h"
|
||||
|
||||
bool MissileConfig::MapMissile()
|
||||
bool MissileConfig::MapMissileNoLog()
|
||||
{
|
||||
if (this->Name.empty()) {
|
||||
this->Missile = NULL;
|
||||
return true;
|
||||
}
|
||||
this->Missile = MissileTypeByIdent(this->Name);
|
||||
return this->Missile != NULL;
|
||||
}
|
||||
|
||||
bool MissileConfig::MapMissile()
|
||||
{
|
||||
if (MapMissileNoLog() == true) {
|
||||
if (this->Name.empty() == false) {
|
||||
ShowLoadProgress(_("Missile %s"), this->Name.c_str());
|
||||
}
|
||||
return true;
|
||||
} else {
|
||||
fprintf(stderr, _("Can't find missile %s\n"), this->Name.c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//@}
|
||||
|
|
Loading…
Reference in a new issue