Help: In debug mode, show unit type id's in their help topics.
Useful when multiple unit types have the same name.
This commit is contained in:
parent
38da648634
commit
d25463e445
1 changed files with 2 additions and 1 deletions
|
@ -933,7 +933,8 @@ std::vector<topic> generate_unit_topics(const bool sort_generated, const std::st
|
|||
if (desc_type != FULL_DESCRIPTION)
|
||||
continue;
|
||||
|
||||
const std::string type_name = type.type_name();
|
||||
const std::string debug_suffix = (game_config::debug ? " (" + type.id() + ")" : "");
|
||||
const std::string type_name = type.type_name() + (!strcmp(type.id().c_str(), type.type_name().c_str()) ? "" : debug_suffix);
|
||||
const std::string real_prefix = type.show_variations_in_help() ? ".." : "";
|
||||
const std::string ref_id = hidden_symbol(type.hide_help()) + real_prefix + unit_prefix + type.id();
|
||||
topic unit_topic(type_name, ref_id, "");
|
||||
|
|
Loading…
Add table
Reference in a new issue