Add no-unit error message for unit debug command

Fixes #6116
This commit is contained in:
mattsc 2022-06-30 08:34:24 -07:00
parent 1ac042c941
commit e8005f51aa

View file

@ -1984,6 +1984,11 @@ void console_handler::do_unit()
unit_map::iterator i = menu_handler_.current_unit();
if(i == menu_handler_.pc_.get_units().end()) {
utils::string_map symbols;
symbols["unit"] = get_arg(1);
command_failed(VGETTEXT(
"Debug command 'unit: $unit' failed: no unit selected or hovered over.",
symbols));
return;
}