int recipe::print_items( WINDOW *w, int ypos, int xpos, nc_color col, int batch ) const
{
    if( !has_byproducts() ) {
        return 0;
    }

    const int oldy = ypos;

    mvwprintz( w, ypos++, xpos, col, _( "Byproducts:" ) );
    for( auto &bp : byproducts ) {
        print_item( w, ypos++, xpos, col, bp, batch );
    }

    return ypos - oldy;
}
Exemple #2
0
int recipe::print_items( WINDOW *w, int ypos, int xpos, nc_color col, int batch ) const
{
    if( !has_byproducts() ) {
        return 0;
    }

    const int oldy = ypos;

    mvwprintz( w, ypos++, xpos, col, _( "Byproducts:" ) );
    for( const auto &bp : byproducts ) {
        mvwprintz( w, ypos++, xpos, col, _( "> %d %s" ), bp.second * batch,
                   item::nname( bp.first ).c_str() );
    }

    return ypos - oldy;
}