summaryrefslogtreecommitdiff
path: root/src/rail_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/rail_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/rail_cmd.cpp')
-rw-r--r--src/rail_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp
index 58d1f5191..86eaa5ca2 100644
--- a/src/rail_cmd.cpp
+++ b/src/rail_cmd.cpp
@@ -37,6 +37,7 @@
#include "pbs.h"
#include "company_base.h"
#include "core/backup_type.hpp"
+#include "date_func.h"
#include "table/strings.h"
#include "table/sprites.h"
@@ -869,6 +870,7 @@ CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u
if (flags & DC_EXEC) {
Depot *d = new Depot(tile);
+ d->build_date = _date;
MakeRailDepot(tile, _current_company, d->index, dir, railtype);
MarkTileDirtyByTile(tile);
@@ -2644,6 +2646,7 @@ static void GetTileDesc_Track(TileIndex tile, TileDesc *td)
td->rail_speed = 61;
}
}
+ td->build_date = Depot::GetByTile(tile)->build_date;
break;
default: