Implemented the extra topics to a race...

...being listed on the sections main page.
This commit is contained in:
Fabian Müller 2010-12-11 16:14:58 +00:00
parent 715a14e26a
commit 605c6e3b59

View file

@ -1727,6 +1727,7 @@ std::vector<topic> generate_unit_topics(const bool sort_generated, const std::st
{
std::vector<topic> topics;
std::set<std::string, string_less> race_units;
std::set<std::string, string_less> race_topics;
foreach (const unit_type_data::unit_type_map::value_type &i, unit_types.types())
{
@ -1767,6 +1768,8 @@ std::vector<topic> generate_unit_topics(const bool sort_generated, const std::st
std::string text = additional_topic["text"];
//topic additional_topic(title, id, text);
topics.push_back(topic(title,id,text));
std::string link = "<ref>text='" + escape(title) + "' dst='" + escape(id) + "'</ref>";
race_topics.insert(link);
}
} else {
race_name = _ ("race^Miscellaneous");
@ -1779,6 +1782,10 @@ std::vector<topic> generate_unit_topics(const bool sort_generated, const std::st
for (std::set<std::string, string_less>::iterator u = race_units.begin(); u != race_units.end(); ++u) {
text << (*u) << "\n";
}
text << "\n\n" << _("<header>text='Race specific topics'</header>") << "\n";
for (std::set<std::string, string_less>::iterator u = race_topics.begin(); u != race_topics.end(); ++u) {
text << (*u) << "\n";
}
topics.push_back(topic(race_name, race_id, text.str()) );
if (sort_generated)