diff options
author | rubidium <rubidium@openttd.org> | 2007-05-19 09:40:18 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-05-19 09:40:18 +0000 |
commit | 7d4be11516e2ef80bcce2a61f08d1cf091401ef1 (patch) | |
tree | fcea59953bd1ce2ff5f0302669d3649bf7ca78bb /src/strings.cpp | |
parent | 816d31f0aac2612ab1b076c5a99480b7534242ae (diff) | |
download | openttd-7d4be11516e2ef80bcce2a61f08d1cf091401ef1.tar.xz |
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
Diffstat (limited to 'src/strings.cpp')
-rw-r--r-- | src/strings.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/strings.cpp b/src/strings.cpp index b0b6fb1a7..eae48281a 100644 --- a/src/strings.cpp +++ b/src/strings.cpp @@ -25,6 +25,8 @@ #include "industry.h" #include "helpers.hpp" #include "cargotype.h" +#include "group.h" +#include "debug.h" /* for opendir/readdir/closedir */ # include "fios.h" @@ -840,6 +842,18 @@ static char* FormatString(char* buff, const char* str, const int32* argv, uint c break; } + case SCC_GROUP_NAME: { // {GROUP} + const Group *g = GetGroup(GetInt32(&argv)); + int32 args[1]; + + assert(IsValidGroup(g)); + + args[0] = g->index; + buff = GetStringWithArgs(buff, (g->string_id == STR_SV_GROUP_NAME) ? (StringID)STR_GROUP_NAME_FORMAT : g->string_id, args, last); + + break; + } + case SCC_CURRENCY_64: { // {CURRENCY64} buff = FormatGenericCurrency(buff, _currency, GetInt64(&argv), false, last); break; |