recruit: Show a transient message if repeating a recruit failed

Reproducible in WoV S3 by recruiting a unit and trying to repeat the recruit.
Previously it failed silently, now it shows a message.
This commit is contained in:
josteph 2019-10-09 23:23:23 +00:00
parent 6b77280c28
commit 534549daa3

View File

@ -302,6 +302,8 @@ bool menu_handler::do_recruit(const std::string& name, int side_num, map_locatio
// search for the unit to be recruited in recruits
if(!utils::contains(actions::get_recruits(side_num, loc), name)) {
gui2::show_transient_message("", VGETTEXT("You cannot recruit a $unit_type_name at this time",
utils::string_map { { "unit_type_name", u_type->type_name() }}));
return false;
}