Link side-bar unit defence rating to unit's Help page (resolves #1297).

This commit is contained in:
Wedge009 2021-09-13 20:10:58 +10:00
parent 8285cac7f5
commit daabe2d183

View file

@ -599,7 +599,8 @@ static config unit_defense(reports::context & rc, const unit* u, const map_locat
}
tooltip << "<b>" << _("Defense: ") << span_color(color) << def << '%' << naps << "</b>";
return text_report(str.str(), tooltip.str());
const std::string has_variations_prefix = (u->type().show_variations_in_help() ? ".." : "");
return text_report(str.str(), tooltip.str(), has_variations_prefix + "unit_" + u->type_id());
}
REPORT_GENERATOR(unit_defense,rc)
{