mirror of https://github.com/OpenTTD/OpenTTD
(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
parent
f733c3795a
commit
e7f70987a4
|
@ -879,6 +879,7 @@ CommandCost CmdBuildTrainDepot(TileIndex tile, DoCommandFlag flags, uint32 p1, u
|
||||||
}
|
}
|
||||||
|
|
||||||
cost.AddCost(_price[PR_BUILD_DEPOT_TRAIN]);
|
cost.AddCost(_price[PR_BUILD_DEPOT_TRAIN]);
|
||||||
|
cost.AddCost(RailBuildCost(railtype));
|
||||||
return cost;
|
return cost;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1145,6 +1145,7 @@ CommandCost CmdBuildRailStation(TileIndex tile_org, DoCommandFlag flags, uint32
|
||||||
if (cost.Failed()) return cost;
|
if (cost.Failed()) return cost;
|
||||||
/* Add construction expenses. */
|
/* Add construction expenses. */
|
||||||
cost.AddCost((numtracks * _price[PR_BUILD_STATION_RAIL] + _price[PR_BUILD_STATION_RAIL_LENGTH]) * plat_len);
|
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;
|
Station *st = NULL;
|
||||||
ret = FindJoiningStation(est, station_to_join, adjacent, new_location, &st);
|
ret = FindJoiningStation(est, station_to_join, adjacent, new_location, &st);
|
||||||
|
|
Loading…
Reference in New Issue