Skip to content

Commit

Permalink
Allow use of small_profile in help browser if specified
Browse files Browse the repository at this point in the history
  • Loading branch information
Vultraz committed Mar 21, 2016
1 parent 05743bc commit c82807a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/help/help_topic_generators.cpp
Expand Up @@ -256,8 +256,10 @@ std::string unit_topic_generator::operator()() const {
ss << "<img>src='" << female_type.image() << "~RC(" << female_type.flag_rgb() << ">red)~XBRZ(2)' box='no'</img> ";
#endif

const std::string &male_portrait = male_type.big_profile();
const std::string &female_portrait = female_type.big_profile();
const std::string &male_portrait = male_type.small_profile().empty() ?
male_type.big_profile() : male_type.small_profile();
const std::string &female_portrait = female_type.small_profile().empty() ?
female_type.big_profile() : female_type.small_profile(); ;

// TODO: figure out why the second checks don't match but the last does
if (!male_portrait.empty() && male_portrait != male_type.image() && male_portrait != "unit_image") {
Expand Down

0 comments on commit c82807a

Please sign in to comment.