mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-20 19:16:53 +00:00
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:
parent
6b77280c28
commit
534549daa3
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user