# HG changeset patch # User rubidium # Date 2010-06-04 21:00:17 # Node ID 9c3b040c26226a5499ab117d10fc492cb6a50a7b # Parent d323c1a04251b9b3e1a208741d8c0aa8798d9a36 (svn r19925) -Fix [FS#3859]: one didn't pay for rail when building depots and stations, so with expensive railtypes building stations and then removing the station would be cheaper than just building the rail diff --git a/src/rail_cmd.cpp b/src/rail_cmd.cpp --- a/src/rail_cmd.cpp +++ b/src/rail_cmd.cpp @@ -879,6 +879,7 @@ CommandCost CmdBuildTrainDepot(TileIndex } cost.AddCost(_price[PR_BUILD_DEPOT_TRAIN]); + cost.AddCost(RailBuildCost(railtype)); return cost; } diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1145,6 +1145,7 @@ CommandCost CmdBuildRailStation(TileInde if (cost.Failed()) return cost; /* Add construction expenses. */ cost.AddCost((numtracks * _price[PR_BUILD_STATION_RAIL] + _price[PR_BUILD_STATION_RAIL_LENGTH]) * plat_len); + cost.AddCost(numtracks * plat_len * RailBuildCost(rt)); Station *st = NULL; ret = FindJoiningStation(est, station_to_join, adjacent, new_location, &st);