1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-21 13:39:09 +00:00

(svn r19801) -Add [FS#3691]: custom naming of depots. Based on work by sbr

This commit is contained in:
rubidium
2010-05-12 20:50:10 +00:00
parent e91165ef6e
commit 1a5d7b34d8
11 changed files with 133 additions and 2 deletions

View File

@@ -950,8 +950,13 @@ static char *FormatString(char *buff, const char *str, int64 *argv, uint casei,
if (vt == VEH_AIRCRAFT) {
int64 temp[] = { GetInt32(&argv) };
buff = GetStringWithArgs(buff, STR_FORMAT_DEPOT_NAME_AIRCRAFT + vt, temp, last);
break;
}
const Depot *d = Depot::Get(GetInt32(&argv));
if (d->name != NULL) {
buff = strecpy(buff, d->name, last);
} else {
const Depot *d = Depot::Get(GetInt32(&argv));
int64 temp[] = { d->town->index, d->town_cn + 1 };
buff = GetStringWithArgs(buff, STR_FORMAT_DEPOT_NAME_TRAIN + 2 * vt + (d->town_cn == 0 ? 0 : 1), temp, last);
}