summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2008-06-04 00:17:48 +0000
committerbelugas <belugas@openttd.org>2008-06-04 00:17:48 +0000
commit840db9bcf0331f70da08ef5c05d1b4483c2a47e8 (patch)
treef210bc22bc9df385671f3a4b6737b90d54df3352 /src/newgrf.cpp
parent1f55797fe3c75ec61ea69e6fa38ca2e4d817d30e (diff)
downloadopenttd-840db9bcf0331f70da08ef5c05d1b4483c2a47e8.tar.xz
(svn r13376) -Feature: Add access to current long year and date from Action 7/9/D and VarAction2 (23/24 or A3/A4)
Add access to (long format) building year, in Variational Action2 Variable 49 for Vehicles
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 15fee8335..110182169 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -3648,6 +3648,14 @@ bool GetGlobalVariable(byte param, uint32 *value)
*value = _settings_game.difficulty.diff_level;
return true;
+ case 0x23: // long format date
+ *value = _date;
+ return true;
+
+ case 0x24: // long format year
+ *value = _cur_year;
+ return true;
+
default: return false;
}
}