- added ability for 'air' and 'land' to be internationalized in the lng files:

FieldAir=Air
FieldLand=Land
- next step is to make a way for tilesets to have lng files (like scenarios)
This commit is contained in:
Mark Vejvoda 2012-04-02 02:07:32 +00:00
parent fce4d55dd5
commit 0254f8a507
1 changed files with 13 additions and 4 deletions

View File

@ -579,10 +579,19 @@ string SkillType::skillClassToStr(SkillClass skillClass) {
};
}
string SkillType::fieldToStr(Field field){
switch(field){
case fLand: return "Land";
case fAir: return "Air";
string SkillType::fieldToStr(Field field) {
Lang &lang= Lang::getInstance();
switch(field) {
case fLand:
if(lang.hasString("FieldLand") == true) {
return lang.get("FieldLand");
}
return "Land";
case fAir:
if(lang.hasString("FieldAir") == true) {
return lang.get("FieldAir");
}
return "Air";
default:
assert(false);
return "";