File diff r6367:1e9e4464ad4c → r6368:b0a38d4167ad
src/station_cmd.cpp
Show inline comments
 
@@ -1117,12 +1117,20 @@ static int32 RemoveRailroadStation(Stati
 
		DeleteStationIfEmpty(st);
 
	}
 

	
 
	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.
 
 */
 
int32 DoConvertStationRail(TileIndex tile, RailType totype, bool exec)
 
{
 
	const Station* st = GetStationByTile(tile);
 

	
 
	if (!CheckOwnership(st->owner) || !EnsureNoVehicle(tile)) return CMD_ERROR;
 

	
 
@@ -1137,13 +1145,13 @@ int32 DoConvertStationRail(TileIndex til
 
	if (exec) {
 
		SetRailType(tile, totype);
 
		MarkTileDirtyByTile(tile);
 
		YapfNotifyTrackLayoutChange(tile, GetRailStationTrack(tile));
 
	}
 

	
 
	return _price.build_rail >> 1;
 
	return _price.build_rail / 2;
 
}
 

	
 
/**
 
 * @param[in] truck_station Determines whether a stop is RoadStop::BUS or RoadStop::TRUCK
 
 * @param[in] station The station to do the whole procedure for
 
 * @return a pointer to where to link a new RoadStop*