From 0b08f7370ddd778da13ed5426c8c4d24fe0d5432 Mon Sep 17 00:00:00 2001 From: smatz Date: Mon, 17 Dec 2007 22:29:27 +0000 Subject: (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 --- src/station_cmd.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/station_cmd.cpp') 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 @@ -1289,29 +1289,6 @@ static CommandCost RemoveRailroadStation(Station *st, TileIndex tile, uint32 fla return cost; } -/** - * 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 -- cgit v1.2.3-54-g00ecf