diff --git a/client/hudwidget.cpp b/client/hudwidget.cpp index a6468ff228..a4ef2702d4 100644 --- a/client/hudwidget.cpp +++ b/client/hudwidget.cpp @@ -1088,6 +1088,13 @@ int unit_actions::update_actions() SC_NUKE)); } + // Clean nuclear fallout + if (can_unit_do_activity(current_unit, ACTIVITY_FALLOUT)) { + actions.append(new hud_action( + this, fcIcons::instance()->getIcon(QStringLiteral("fallout")), + SC_FALLOUT)); + } + // Wait actions.append(new hud_action( this, fcIcons::instance()->getIcon(QStringLiteral("wait")), SC_WAIT)); diff --git a/client/menu.cpp b/client/menu.cpp index dd8e85ec81..e97b684265 100644 --- a/client/menu.cpp +++ b/client/menu.cpp @@ -921,7 +921,7 @@ void mr_menu::setup_menus() connect(act, &QAction::triggered, this, &mr_menu::slot_clean_pollution); act = menu->addAction(_("Clean Nuclear Fallout")); menu_list.insert(FALLOUT, act); - act->setShortcut(QKeySequence(tr("n"))); + shortcuts->link_action(SC_FALLOUT, act); connect(act, &QAction::triggered, this, &mr_menu::slot_clean_fallout); act = menu->addAction( QString(action_id_name_translation(ACTION_HELP_WONDER))); diff --git a/client/shortcuts.cpp b/client/shortcuts.cpp index 2718cada4c..9e6428116b 100644 --- a/client/shortcuts.cpp +++ b/client/shortcuts.cpp @@ -185,7 +185,9 @@ static std::vector default_shortcuts() {SC_GOJOINCITY, fc_shortcut::keyboard, Qt::Key_J | Qt::ShiftModifier, Qt::AllButtons, Qt::NoModifier, _("Go And Join City")}, {SC_PILLAGE, fc_shortcut::keyboard, Qt::Key_P | Qt::ShiftModifier, - Qt::AllButtons, Qt::NoModifier, _("Pillage")}}; + Qt::AllButtons, Qt::NoModifier, _("Pillage")}, + {SC_FALLOUT, fc_shortcut::keyboard, Qt::Key_N, Qt::AllButtons, + Qt::NoModifier, _("Clean Nuclear Fallout")}}; } /** diff --git a/client/shortcuts.h b/client/shortcuts.h index a935fc1bfd..42b16458b7 100644 --- a/client/shortcuts.h +++ b/client/shortcuts.h @@ -91,6 +91,7 @@ enum shortcut_id { SC_GOBUILDCITY = 57, SC_GOJOINCITY = 58, SC_PILLAGE = 59, + SC_FALLOUT = 60, }; /************************************************************************** diff --git a/data/themes/icons/fallout.svg b/data/themes/icons/fallout.svg new file mode 100644 index 0000000000..aa57678bb5 --- /dev/null +++ b/data/themes/icons/fallout.svg @@ -0,0 +1 @@ + diff --git a/data/themes/icons/fallout.svg.license b/data/themes/icons/fallout.svg.license new file mode 100644 index 0000000000..e4037a848c --- /dev/null +++ b/data/themes/icons/fallout.svg.license @@ -0,0 +1,4 @@ +SPDX-License-Identifier: CC-BY-SA-3.0 +SPDX-FileCopyrightText: Petar Marjanovic +SPDX-FileCopyrightText: 2016 ChNPP +SPDX-FileCopyrightText: 2024 Tobias Rehbein diff --git a/docs/Manuals/Game/shortcut-options.rst b/docs/Manuals/Game/shortcut-options.rst index 122fde200c..22b9443a77 100644 --- a/docs/Manuals/Game/shortcut-options.rst +++ b/docs/Manuals/Game/shortcut-options.rst @@ -1,5 +1,6 @@ .. SPDX-License-Identifier: GPL-3.0-or-later .. SPDX-FileCopyrightText: James Robertson +.. SPDX-FileCopyrightText: Tobias Rehbein .. Custom Interpretive Text Roles for longturn.net/Freeciv21 .. role:: unit @@ -360,3 +361,8 @@ Pillage Instruct a unit to pillage infrastructure improvements on a tile. Default: ``Shift+P`` + +Clean Nuclear Fallout + Instruct a unit to clean nuclear fallout on a tile. + + Default: ``N``