summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-06-20 19:13:02 +0000
committeryexo <yexo@openttd.org>2010-06-20 19:13:02 +0000
commit9cfb61adf58f882f03f17da05e84c25f7572be6d (patch)
treeeeff74805ecd5cdd0a0869ee5dab36d34492a883 /src/water_cmd.cpp
parentf2d6bf6b584e22932fc2e7778aa2d57c033ab62a (diff)
downloadopenttd-9cfb61adf58f882f03f17da05e84c25f7572be6d.tar.xz
(svn r20003) -Feature [FS#3886]: [NewGRF] var 43 depot build date for railtypes
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index ae8d52271..a83c1aa56 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -35,6 +35,7 @@
#include "ai/ai.hpp"
#include "core/random_func.hpp"
#include "core/backup_type.hpp"
+#include "date_func.h"
#include "table/sprites.h"
#include "table/strings.h"
@@ -131,6 +132,7 @@ CommandCost CmdBuildShipDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui
if (flags & DC_EXEC) {
Depot *depot = new Depot(tile);
+ depot->build_date = _date;
MakeShipDepot(tile, _current_company, depot->index, DEPOT_NORTH, axis, wc1);
MakeShipDepot(tile2, _current_company, depot->index, DEPOT_SOUTH, axis, wc2);
@@ -729,7 +731,10 @@ static void GetTileDesc_Water(TileIndex tile, TileDesc *td)
break;
case WATER_TILE_COAST: td->str = STR_LAI_WATER_DESCRIPTION_COAST_OR_RIVERBANK; break;
case WATER_TILE_LOCK : td->str = STR_LAI_WATER_DESCRIPTION_LOCK; break;
- case WATER_TILE_DEPOT: td->str = STR_LAI_WATER_DESCRIPTION_SHIP_DEPOT; break;
+ case WATER_TILE_DEPOT:
+ td->str = STR_LAI_WATER_DESCRIPTION_SHIP_DEPOT;
+ td->build_date = Depot::GetByTile(tile)->build_date;
+ break;
default: NOT_REACHED(); break;
}