summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-19 09:40:18 +0000
committerrubidium <rubidium@openttd.org>2007-05-19 09:40:18 +0000
commit8f0f090c5139465bb2db1bf280886a563a68385d (patch)
treefcea59953bd1ce2ff5f0302669d3649bf7ca78bb /src/strings.cpp
parent9a4b4ba4484112c7eefa6ed134ec4d725be7d2a7 (diff)
downloadopenttd-8f0f090c5139465bb2db1bf280886a563a68385d.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.cpp14
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;