- 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

View File

@ -579,10 +579,19 @@ string SkillType::skillClassToStr(SkillClass skillClass) {
}; };
} }
string SkillType::fieldToStr(Field field){ string SkillType::fieldToStr(Field field) {
switch(field){ Lang &lang= Lang::getInstance();
case fLand: return "Land"; switch(field) {
case fAir: return "Air"; 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: default:
assert(false); assert(false);
return ""; return "";