mirror of https://github.com/OpenTTD/OpenTTD
Codechange: prefer SPECSTR_TOWNNAME_START over _ENGLISH
parent
65731bb964
commit
ed36305d29
|
@ -119,6 +119,6 @@ uint16_t GetGRFTownNameType(uint16_t gen)
|
||||||
if (gen < t.styles.size()) return gen;
|
if (gen < t.styles.size()) return gen;
|
||||||
gen -= static_cast<uint16_t>(t.styles.size());
|
gen -= static_cast<uint16_t>(t.styles.size());
|
||||||
}
|
}
|
||||||
/* Fallback to english original */
|
/* Fallback to the first built in town name (English). */
|
||||||
return SPECSTR_TOWNNAME_ENGLISH;
|
return SPECSTR_TOWNNAME_START;
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,7 +147,7 @@ static void FixOldTowns()
|
||||||
/* Convert town-names if needed */
|
/* Convert town-names if needed */
|
||||||
for (Town *town : Town::Iterate()) {
|
for (Town *town : Town::Iterate()) {
|
||||||
if (IsInsideMM(town->townnametype, 0x20C1, 0x20C3)) {
|
if (IsInsideMM(town->townnametype, 0x20C1, 0x20C3)) {
|
||||||
town->townnametype = SPECSTR_TOWNNAME_ENGLISH + _settings_game.game_creation.town_name;
|
town->townnametype = SPECSTR_TOWNNAME_START + _settings_game.game_creation.town_name;
|
||||||
town->townnameparts = RemapOldTownName(town->townnameparts, _settings_game.game_creation.town_name);
|
town->townnameparts = RemapOldTownName(town->townnameparts, _settings_game.game_creation.town_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,9 @@ TownNameParams::TownNameParams(const Town *t) :
|
||||||
type(t->townnametype)
|
type(t->townnametype)
|
||||||
{
|
{
|
||||||
if (t->townnamegrfid != 0 && GetGRFTownName(t->townnamegrfid) == nullptr) {
|
if (t->townnamegrfid != 0 && GetGRFTownName(t->townnamegrfid) == nullptr) {
|
||||||
/* Fallback to english original */
|
/* Fallback to the first built in town name (English). */
|
||||||
this->grfid = 0;
|
this->grfid = 0;
|
||||||
this->type = SPECSTR_TOWNNAME_ENGLISH;
|
this->type = SPECSTR_TOWNNAME_START;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue