Include the new-style special notes in the sidebar's unit description
This commit is contained in:
parent
eec7bc7c8f
commit
ecf993174b
2 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue