1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-24 23:19:09 +00:00

(svn r9411) -Codechange: Add support for loading of newcargo data.

This commit is contained in:
2007-03-22 23:19:40 +00:00
parent ff9bbf6bc3
commit 4d81a464e2
6 changed files with 231 additions and 29 deletions

View File

@@ -585,9 +585,15 @@ static char* FormatString(char* buff, const char* str, const int32* argv, uint c
}
default:
buff = FormatCommaNumber(buff, GetInt32(&argv), last);
buff = strecpy(buff, " ", last);
buff = strecpy(buff, GetStringPtr(cargo_str), last);
if (cargo_str >= 0xE000 && cargo_str < 0xF800) {
/* NewGRF strings from Action 4 use a different format here,
* of e.g. "x tonnes of coal", so process accordingly. */
buff = GetStringWithArgs(buff, cargo_str, argv++, last);
} else {
buff = FormatCommaNumber(buff, GetInt32(&argv), last);
buff = strecpy(buff, " ", last);
buff = strecpy(buff, GetStringPtr(cargo_str), last);
}
break;
}
} break;