summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-12-11 12:55:04 +0000
committeryexo <yexo@openttd.org>2011-12-11 12:55:04 +0000
commit7a7d9a7b6bec20c94ae3f190e52beacac5007fce (patch)
tree78fabeda4ef0349db557ab7e484a7f01ad83cbad /src/newgrf.cpp
parentf3b78bf076724b10d5e70fdac7babca228447b78 (diff)
downloadopenttd-7a7d9a7b6bec20c94ae3f190e52beacac5007fce.tar.xz
(svn r23494) -Feature: [NewGRF] action14 node INFO->URL_ to add an url
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 52de2703c..844d1fdae 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -7065,6 +7065,13 @@ static bool ChangeGRFDescription(byte langid, const char *str)
return true;
}
+/** Callback function for 'INFO'->'URL_' to set the newgrf url. */
+static bool ChangeGRFURL(byte langid, const char *str)
+{
+ AddGRFTextToList(&_cur.grfconfig->url->text, langid, _cur.grfconfig->ident.grfid, false, str);
+ return true;
+}
+
/** Callback function for 'INFO'->'NPAR' to set the number of valid parameters. */
static bool ChangeGRFNumUsedParams(size_t len, ByteReader *buf)
{
@@ -7412,6 +7419,7 @@ static bool HandleParameterInfo(ByteReader *buf)
AllowedSubtags _tags_info[] = {
AllowedSubtags('NAME', ChangeGRFName),
AllowedSubtags('DESC', ChangeGRFDescription),
+ AllowedSubtags('URL_', ChangeGRFURL),
AllowedSubtags('NPAR', ChangeGRFNumUsedParams),
AllowedSubtags('PALS', ChangeGRFPalette),
AllowedSubtags('BLTR', ChangeGRFBlitter),