diff options
author | frosch <frosch@openttd.org> | 2008-08-20 19:31:35 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2008-08-20 19:31:35 +0000 |
commit | 59f813267c8830751f569e818025806632748ab6 (patch) | |
tree | 87429c357bea2a7f2ca3d1f30590cf4821ba67a8 | |
parent | 24c01374a17f5152c047b9d18509c70ab4914cad (diff) | |
download | openttd-59f813267c8830751f569e818025806632748ab6.tar.xz |
(svn r14112) -Fix (r13715)[FS#2232]: Action B custom messages with parameteers were broken.
-rw-r--r-- | src/lang/english.txt | 14 | ||||
-rw-r--r-- | src/newgrf_gui.cpp | 29 |
2 files changed, 20 insertions, 23 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt index 672dd0bc5..64c253b19 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -3205,13 +3205,13 @@ STR_NEWGRF_ERROR_MSG_INFO :{SILVER}{RAW_ST STR_NEWGRF_ERROR_MSG_WARNING :{RED}Warning: {SILVER}{RAW_STRING} STR_NEWGRF_ERROR_MSG_ERROR :{RED}Error: {SILVER}{RAW_STRING} STR_NEWGRF_ERROR_MSG_FATAL :{RED}Fatal: {SILVER}{RAW_STRING} -STR_NEWGRF_ERROR_VERSION_NUMBER :{RAW_STRING} will not work with the TTDPatch version reported by OpenTTD. -STR_NEWGRF_ERROR_DOS_OR_WINDOWS :{RAW_STRING} is for the {RAW_STRING} version of TTD. -STR_NEWGRF_ERROR_UNSET_SWITCH :{RAW_STRING} is designed to be used with {RAW_STRING} -STR_NEWGRF_ERROR_INVALID_PARAMETER :Invalid parameter for {RAW_STRING}: parameter {RAW_STRING} ({NUM}) -STR_NEWGRF_ERROR_LOAD_BEFORE :{RAW_STRING} must be loaded before {RAW_STRING}. -STR_NEWGRF_ERROR_LOAD_AFTER :{RAW_STRING} must be loaded after {RAW_STRING}. -STR_NEWGRF_ERROR_OTTD_VERSION_NUMBER :{RAW_STRING} requires OpenTTD version {RAW_STRING} or better. +STR_NEWGRF_ERROR_VERSION_NUMBER :{SKIP}{STRING1} will not work with the TTDPatch version reported by OpenTTD. +STR_NEWGRF_ERROR_DOS_OR_WINDOWS :{SKIP}{STRING1} is for the {STRING1} version of TTD. +STR_NEWGRF_ERROR_UNSET_SWITCH :{SKIP}{STRING1} is designed to be used with {STRING1} +STR_NEWGRF_ERROR_INVALID_PARAMETER :{SKIP}Invalid parameter for {STRING1}: parameter {STRING1} ({NUM}) +STR_NEWGRF_ERROR_LOAD_BEFORE :{SKIP}{STRING1} must be loaded before {STRING1}. +STR_NEWGRF_ERROR_LOAD_AFTER :{SKIP}{STRING1} must be loaded after {STRING1}. +STR_NEWGRF_ERROR_OTTD_VERSION_NUMBER :{SKIP}{STRING1} requires OpenTTD version {STRING1} or better. STR_NEWGRF_ERROR_AFTER_TRANSLATED_FILE :the GRF file it was designed to translate STR_NEWGRF_ERROR_TOO_MANY_NEWGRFS_LOADED :Too many NewGRFs are loaded. STR_NEWGRF_ERROR_STATIC_GRF_CAUSES_DESYNC :Loading {RAW_STRING} as static NewGRF with {RAW_STRING} could cause desyncs. diff --git a/src/newgrf_gui.cpp b/src/newgrf_gui.cpp index 907ade31d..a996d0521 100644 --- a/src/newgrf_gui.cpp +++ b/src/newgrf_gui.cpp @@ -53,23 +53,20 @@ static void ShowNewGRFInfo(const GRFConfig *c, uint x, uint y, uint w, uint bott if (c->error != NULL) { char message[512]; - if (c->error->custom_message == NULL) { - SetDParamStr(0, c->filename); - SetDParamStr(1, c->error->data); - for (uint i = 0; i < c->error->num_params; i++) { - uint32 param = 0; - byte param_number = c->error->param_number[i]; - - if (param_number < c->num_params) param = c->param[param_number]; - - SetDParam(2 + i, param); - } - - GetString(message, c->error->message, lastof(message)); - } else { - SetDParamStr(0, c->error->custom_message); - GetString(message, STR_JUST_RAW_STRING, lastof(message)); + SetDParamStr(0, c->error->custom_message); // is skipped by built-in messages + SetDParam (1, STR_JUST_RAW_STRING); + SetDParamStr(2, c->filename); + SetDParam (3, STR_JUST_RAW_STRING); + SetDParamStr(4, c->error->data); + for (uint i = 0; i < c->error->num_params; i++) { + uint32 param = 0; + byte param_number = c->error->param_number[i]; + + if (param_number < c->num_params) param = c->param[param_number]; + + SetDParam(5 + i, param); } + GetString(message, c->error->custom_message == NULL ? c->error->message : STR_JUST_RAW_STRING, lastof(message)); SetDParamStr(0, message); y += DrawStringMultiLine(x, y, c->error->severity, w, bottom - y); |