From 9cfb61adf58f882f03f17da05e84c25f7572be6d Mon Sep 17 00:00:00 2001 From: yexo Date: Sun, 20 Jun 2010 19:13:02 +0000 Subject: (svn r20003) -Feature [FS#3886]: [NewGRF] var 43 depot build date for railtypes --- src/road_cmd.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/road_cmd.cpp') diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp index ac81ea005..ab5a5df5c 100644 --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -36,6 +36,7 @@ #include "company_base.h" #include "core/random_func.hpp" #include "newgrf_railtype.h" +#include "date_func.h" #include "table/strings.h" @@ -909,6 +910,7 @@ CommandCost CmdBuildRoadDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, ui if (flags & DC_EXEC) { Depot *dep = new Depot(tile); + dep->build_date = _date; MakeRoadDepot(tile, _current_company, dep->index, dir, rt); MarkTileDirtyByTile(tile); @@ -1534,6 +1536,7 @@ static void GetTileDesc_Road(TileIndex tile, TileDesc *td) case ROAD_TILE_DEPOT: td->str = STR_LAI_ROAD_DESCRIPTION_ROAD_VEHICLE_DEPOT; road_owner = GetTileOwner(tile); // Tile has only one owner, roadtype does not matter + td->build_date = Depot::GetByTile(tile)->build_date; break; default: { -- cgit v1.2.3-54-g00ecf