Skip to content

Commit

Permalink
Include the new-style special notes in the sidebar's unit description
Browse files Browse the repository at this point in the history
  • Loading branch information
stevecotton committed May 26, 2021
1 parent eec7bc7 commit ecf9931
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.md
Expand Up @@ -13,6 +13,7 @@
### User interface
### WML Engine
### Miscellaneous and Bug Fixes
* The unit description tooltip in the sidebar now includes the text from `[special_note]`s.

## Version 1.15.13
### Add-ons client
Expand Down
6 changes: 6 additions & 0 deletions src/reports.cpp
Expand Up @@ -192,6 +192,12 @@ static config unit_type(const unit* u)
str << u->type_name();
tooltip << _("Type: ") << "<b>" << u->type_name() << "</b>\n"
<< u->unit_description();
if(const auto& notes = u->unit_special_notes(); !notes.empty()) {
tooltip << "\n\n" << _("Special Notes:") << '\n';
for(const auto& note : notes) {
tooltip << "" << note << '\n';
}
}
return text_report(str.str(), tooltip.str(), has_variations_prefix + "unit_" + u->type_id());
}
REPORT_GENERATOR(unit_type, rc)
Expand Down

0 comments on commit ecf9931

Please sign in to comment.