summaryrefslogtreecommitdiff
path: root/src/strings.cpp
diff options
context:
space:
mode:
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;