diff options
author | smatz <smatz@openttd.org> | 2007-12-17 22:29:27 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2007-12-17 22:29:27 +0000 |
commit | 0b08f7370ddd778da13ed5426c8c4d24fe0d5432 (patch) | |
tree | 4b515d99becc25cc7fb8461375ce7ffa41682f47 /src/station_cmd.cpp | |
parent | bda9d4a23633c4ebb6ad18c29218deaf1a92d55d (diff) | |
download | openttd-0b08f7370ddd778da13ed5426c8c4d24fe0d5432.tar.xz |
(svn r11657) -Fix: show better error message when trying to convert rail
-Codechange: merge DoConvert functions into one, make test and exec runs the same for tunnels/bridges
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index 0e189bd05..dc077e27f 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -1290,29 +1290,6 @@ static CommandCost RemoveRailroadStation(Station *st, TileIndex tile, uint32 fla } /** - * Switches the rail type at a railway station tile. - * @param tile The tile on which the railtype is to be convert. - * @param totype The railtype we want to convert to - * @param exec Switches between test and execute mode - * @return The cost and state of the operation - * @retval CMD_ERROR An error occured during the operation. - */ -CommandCost DoConvertStationRail(TileIndex tile, RailType totype, bool exec) -{ - /* Tile is not a railroad station? */ - if (!IsRailwayStation(tile)) return CMD_ERROR; - - if (exec) { - SetRailType(tile, totype); - MarkTileDirtyByTile(tile); - YapfNotifyTrackLayoutChange(tile, GetRailStationTrack(tile)); - VehicleFromPos(tile, NULL, &UpdateTrainPowerProc); - } - - return CommandCost(RailConvertCost(GetRailType(tile), totype)); -} - -/** * @param truck_station Determines whether a stop is RoadStop::BUS or RoadStop::TRUCK * @param st The Station to do the whole procedure for * @return a pointer to where to link a new RoadStop* |