MP Faction Select dialog: Always show the leading unit information, never "Unknown Unit".

This commit is contained in:
josteph 2018-05-25 19:29:11 +00:00 committed by Jyrki Vesterinen
parent 8fe296d0f3
commit 1c7855168d

View file

@ -34,6 +34,7 @@
#include "game_config_manager.hpp"
#include "gettext.hpp"
#include "help/help.hpp"
#include "preferences/game.hpp" // for encountered_units
#include "units/types.hpp"
#include "utils/functional.hpp"
@ -214,6 +215,7 @@ void faction_select::profile_button_callback(window& window)
const std::string& leader_type = find_widget<menu_button>(&window, "leader_menu", false).get_value_string();
const unit_type* ut = unit_types.find(leader_type);
if(ut != nullptr) {
preferences::encountered_units().insert(ut->id());
help::help_manager help_manager(&game_config_manager::get()->game_config());
help::show_unit_description(*ut);
}