diff --git a/src/strings.cpp b/src/strings.cpp index ec59d6011f..3a920811e8 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -1682,6 +1682,10 @@ static char *FormatString(char *buff, const char *str_arg, StringParameters *arg break; } + case SCC_CONSUME_ARG: + // do nothing + break; + default: if (buff + Utf8CharLen(b) < last) buff += Utf8Encode(buff, b); break; diff --git a/src/table/control_codes.h b/src/table/control_codes.h index a342c0bace..14fd6647f8 100644 --- a/src/table/control_codes.h +++ b/src/table/control_codes.h @@ -116,6 +116,8 @@ enum StringControlCode { SCC_BLACK, SCC_PREVIOUS_COLOUR, + SCC_CONSUME_ARG, + /** * The next variables are part of a NewGRF subsystem for creating text strings. * It uses a "stack" of bytes and reads from there. diff --git a/src/table/strgen_tables.h b/src/table/strgen_tables.h index d8591e7ffe..04c6b26b37 100644 --- a/src/table/strgen_tables.h +++ b/src/table/strgen_tables.h @@ -139,6 +139,8 @@ static const CmdStruct _cmd_structs[] = { {"SMALL_LEFT_ARROW", EmitSingleChar, SCC_LESS_THAN, 0, -1, C_DONTCOUNT}, {"SMALL_RIGHT_ARROW", EmitSingleChar, SCC_GREATER_THAN, 0, -1, C_DONTCOUNT}, + {"CONSUME_ARG", EmitSingleChar, SCC_CONSUME_ARG, 1, 0, C_NONE}, + /* The following are directional formatting codes used to get the RTL strings right: * http://www.unicode.org/unicode/reports/tr9/#Directional_Formatting_Codes */ {"LRM", EmitSingleChar, CHAR_TD_LRM, 0, -1, C_DONTCOUNT},