Skip to content
Permalink
Browse files

Fix book known recipe highlighting.

  • Loading branch information...
OzoneH3 committed Dec 3, 2015
1 parent 3fe4d9d commit 533b51ac5b92680d57146bf91186650c38a9933a
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/item.cpp
@@ -1114,9 +1114,9 @@ std::string item::info( bool showtext, std::vector<iteminfo> &info ) const
// In case the recipe is known, but has a different name in the book, use the
// real name to avoid confusing the player.
const std::string name = item::nname( elem.recipe->result );
recipe_list.push_back( string_format( "<color_ltgray>%s</color>", name.c_str() ) );
recipe_list.push_back( "<bold>" + name + "</bold>" );
} else {
recipe_list.push_back( elem.name );
recipe_list.push_back( "<dark>" + elem.name + "</dark>" );
}
}
if( !recipe_list.empty() ) {
@@ -1135,6 +1135,7 @@ std::string item::info( bool showtext, std::vector<iteminfo> &info ) const
ngettext( "This book contains %1$d crafting recipe: %2$s",
"This book contains %1$d crafting recipes: %2$s", recipe_list.size() ),
recipe_list.size(), recipes.c_str() );

insert_separation_line();
info.push_back( iteminfo( "DESCRIPTION", recipe_line ) );
}

0 comments on commit 533b51a

Please sign in to comment.
You can’t perform that action at this time.