From e984b6fe1bbf47696327cd744af94baf892ca342 Mon Sep 17 00:00:00 2001
From: Ihnatus <ignatus31oct@mail.ru>
Date: Wed, 2 Jul 2025 20:32:31 +0300
Subject: [PATCH] actions.c: Drop action_ui_name_ruleset_var_name

Unused.

See RM#1553

Signed-off-by: Ihnatus <ignatus31oct@mail.ru>
---
 common/actions.c | 300 -----------------------------------------------
 common/actions.h |   2 -
 2 files changed, 302 deletions(-)

diff --git a/common/actions.c b/common/actions.c
index 99680d5da6..b1733c5aa6 100644
--- a/common/actions.c
+++ b/common/actions.c
@@ -5799,306 +5799,6 @@ void action_array_add_all_by_result(action_id *act_array,
   } action_iterate_end;
 }
 
-/**********************************************************************//**
-  Return ui_name ruleset variable name for the action.
-
-  TODO: make actions generic and put ui_name in a field of the action.
-**************************************************************************/
-const char *action_ui_name_ruleset_var_name(int act)
-{
-  switch ((enum gen_action)act) {
-  case ACTION_SPY_POISON:
-    return "ui_name_poison_city";
-  case ACTION_SPY_POISON_ESC:
-    return "ui_name_poison_city_escape";
-  case ACTION_SPY_SABOTAGE_UNIT:
-    return "ui_name_sabotage_unit";
-  case ACTION_SPY_SABOTAGE_UNIT_ESC:
-    return "ui_name_sabotage_unit_escape";
-  case ACTION_SPY_BRIBE_UNIT:
-    return "ui_name_bribe_unit";
-  case ACTION_SPY_BRIBE_STACK:
-    return "ui_name_bribe_stack";
-  case ACTION_SPY_SABOTAGE_CITY:
-    return "ui_name_sabotage_city";
-  case ACTION_SPY_SABOTAGE_CITY_ESC:
-    return "ui_name_sabotage_city_escape";
-  case ACTION_SPY_TARGETED_SABOTAGE_CITY:
-    return "ui_name_targeted_sabotage_city";
-  case ACTION_SPY_SABOTAGE_CITY_PRODUCTION:
-    return "ui_name_sabotage_city_production";
-  case ACTION_SPY_TARGETED_SABOTAGE_CITY_ESC:
-    return "ui_name_targeted_sabotage_city_escape";
-  case ACTION_SPY_SABOTAGE_CITY_PRODUCTION_ESC:
-    return "ui_name_sabotage_city_production_escape";
-  case ACTION_SPY_INCITE_CITY:
-    return "ui_name_incite_city";
-  case ACTION_SPY_INCITE_CITY_ESC:
-    return "ui_name_incite_city_escape";
-  case ACTION_ESTABLISH_EMBASSY:
-    return "ui_name_establish_embassy";
-  case ACTION_ESTABLISH_EMBASSY_STAY:
-    return "ui_name_establish_embassy_stay";
-  case ACTION_SPY_STEAL_TECH:
-    return "ui_name_steal_tech";
-  case ACTION_SPY_STEAL_TECH_ESC:
-    return "ui_name_steal_tech_escape";
-  case ACTION_SPY_TARGETED_STEAL_TECH:
-    return "ui_name_targeted_steal_tech";
-  case ACTION_SPY_TARGETED_STEAL_TECH_ESC:
-    return "ui_name_targeted_steal_tech_escape";
-  case ACTION_SPY_INVESTIGATE_CITY:
-    return "ui_name_investigate_city";
-  case ACTION_INV_CITY_SPEND:
-    return "ui_name_investigate_city_spend_unit";
-  case ACTION_SPY_STEAL_GOLD:
-    return "ui_name_steal_gold";
-  case ACTION_SPY_STEAL_GOLD_ESC:
-    return "ui_name_steal_gold_escape";
-  case ACTION_SPY_SPREAD_PLAGUE:
-    return "ui_name_spread_plague";
-  case ACTION_STEAL_MAPS:
-    return "ui_name_steal_maps";
-  case ACTION_STEAL_MAPS_ESC:
-    return "ui_name_steal_maps_escape";
-  case ACTION_TRADE_ROUTE:
-    return "ui_name_establish_trade_route";
-  case ACTION_MARKETPLACE:
-    return "ui_name_enter_marketplace";
-  case ACTION_HELP_WONDER:
-    return "ui_name_help_wonder";
-  case ACTION_CAPTURE_UNITS:
-    return "ui_name_capture_units";
-  case ACTION_EXPEL_UNIT:
-    return "ui_name_expel_unit";
-  case ACTION_FOUND_CITY:
-    return "ui_name_found_city";
-  case ACTION_JOIN_CITY:
-    return "ui_name_join_city";
-  case ACTION_BOMBARD:
-    return "ui_name_bombard";
-  case ACTION_BOMBARD2:
-    return "ui_name_bombard_2";
-  case ACTION_BOMBARD3:
-    return "ui_name_bombard_3";
-  case ACTION_BOMBARD4:
-    return "ui_name_bombard_4";
-  case ACTION_BOMBARD_LETHAL:
-    return "ui_name_bombard_lethal";
-  case ACTION_BOMBARD_LETHAL2:
-    return "ui_name_bombard_lethal_2";
-  case ACTION_SPY_NUKE:
-    return "ui_name_suitcase_nuke";
-  case ACTION_SPY_NUKE_ESC:
-    return "ui_name_suitcase_nuke_escape";
-  case ACTION_NUKE:
-    return "ui_name_explode_nuclear";
-  case ACTION_NUKE_CITY:
-    return "ui_name_nuke_city";
-  case ACTION_NUKE_UNITS:
-    return "ui_name_nuke_units";
-  case ACTION_DESTROY_CITY:
-    return "ui_name_destroy_city";
-  case ACTION_DISBAND_UNIT_RECOVER:
-    return "ui_name_disband_unit_recover";
-  case ACTION_DISBAND_UNIT:
-    return "ui_name_disband_unit";
-  case ACTION_HOME_CITY:
-    return "ui_name_home_city";
-  case ACTION_HOMELESS:
-    return "ui_name_homeless";
-  case ACTION_UPGRADE_UNIT:
-    return "ui_name_upgrade_unit";
-  case ACTION_PARADROP:
-    return "ui_name_paradrop_unit";
-  case ACTION_PARADROP_CONQUER:
-    return "ui_name_paradrop_unit_conquer";
-  case ACTION_PARADROP_FRIGHTEN:
-    return "ui_name_paradrop_unit_frighten";
-  case ACTION_PARADROP_FRIGHTEN_CONQUER:
-    return "ui_name_paradrop_unit_frighten_conquer";
-  case ACTION_PARADROP_ENTER:
-    return "ui_name_paradrop_unit_enter";
-  case ACTION_PARADROP_ENTER_CONQUER:
-    return "ui_name_paradrop_unit_enter_conquer";
-  case ACTION_AIRLIFT:
-    return "ui_name_airlift_unit";
-  case ACTION_ATTACK:
-    return "ui_name_attack";
-  case ACTION_ATTACK2:
-    return "ui_name_attack_2";
-  case ACTION_SUICIDE_ATTACK:
-    return "ui_name_suicide_attack";
-  case ACTION_SUICIDE_ATTACK2:
-    return "ui_name_suicide_attack_2";
-  case ACTION_WIPE_UNITS:
-    return "ui_name_wipe_units";
-  case ACTION_COLLECT_RANSOM:
-    return "ui_name_collect_ransom";
-  case ACTION_STRIKE_BUILDING:
-    return "ui_name_surgical_strike_building";
-  case ACTION_STRIKE_PRODUCTION:
-    return "ui_name_surgical_strike_production";
-  case ACTION_CONQUER_CITY_SHRINK:
-    return "ui_name_conquer_city_shrink";
-  case ACTION_CONQUER_CITY_SHRINK2:
-    return "ui_name_conquer_city_shrink2";
-  case ACTION_CONQUER_CITY_SHRINK3:
-    return "ui_name_conquer_city_shrink3";
-  case ACTION_CONQUER_CITY_SHRINK4:
-    return "ui_name_conquer_city_shrink4";
-  case ACTION_CONQUER_EXTRAS:
-    return "ui_name_conquer_extras";
-  case ACTION_CONQUER_EXTRAS2:
-    return "ui_name_conquer_extras_2";
-  case ACTION_CONQUER_EXTRAS3:
-    return "ui_name_conquer_extras_3";
-  case ACTION_CONQUER_EXTRAS4:
-    return "ui_name_conquer_extras_4";
-  case ACTION_HEAL_UNIT:
-    return "ui_name_heal_unit";
-  case ACTION_HEAL_UNIT2:
-    return "ui_name_heal_unit_2";
-  case ACTION_TRANSFORM_TERRAIN:
-    return "ui_name_transform_terrain";
-  case ACTION_TRANSFORM_TERRAIN2:
-    return "ui_name_transform_terrain_2";
-  case ACTION_CULTIVATE:
-    return "ui_name_cultivate";
-  case ACTION_CULTIVATE2:
-    return "ui_name_cultivate_2";
-  case ACTION_PLANT:
-    return "ui_name_plant";
-  case ACTION_PLANT2:
-    return "ui_name_plant_2";
-  case ACTION_PILLAGE:
-    return "ui_name_pillage";
-  case ACTION_PILLAGE2:
-    return "ui_name_pillage_2";
-  case ACTION_CLEAN:
-    return "ui_name_clean";
-  case ACTION_CLEAN2:
-    return "ui_name_clean_2";
-  case ACTION_FORTIFY:
-    return "ui_name_fortify";
-  case ACTION_FORTIFY2:
-    return "ui_name_fortify_2";
-  case ACTION_ROAD:
-    return "ui_name_build_road";
-  case ACTION_ROAD2:
-    return "ui_name_build_road_2";
-  case ACTION_CONVERT:
-    return "ui_name_convert_unit";
-  case ACTION_BASE:
-    return "ui_name_build_base";
-  case ACTION_BASE2:
-    return "ui_name_build_base_2";
-  case ACTION_MINE:
-    return "ui_name_build_mine";
-  case ACTION_MINE2:
-    return "ui_name_build_mine_2";
-  case ACTION_IRRIGATE:
-    return "ui_name_irrigate";
-  case ACTION_IRRIGATE2:
-    return "ui_name_irrigate_2";
-  case ACTION_TRANSPORT_DEBOARD:
-    return "ui_name_transport_deboard";
-  case ACTION_TRANSPORT_BOARD:
-    return "ui_name_transport_board";
-  case ACTION_TRANSPORT_BOARD2:
-    return "ui_name_transport_board_2";
-  case ACTION_TRANSPORT_BOARD3:
-    return "ui_name_transport_board_3";
-  case ACTION_TRANSPORT_EMBARK:
-    return "ui_name_transport_embark";
-  case ACTION_TRANSPORT_EMBARK2:
-    return "ui_name_transport_embark_2";
-  case ACTION_TRANSPORT_EMBARK3:
-    return "ui_name_transport_embark_3";
-  case ACTION_TRANSPORT_EMBARK4:
-    return "ui_name_transport_embark_4";
-  case ACTION_TRANSPORT_UNLOAD:
-    return "ui_name_transport_unload";
-  case ACTION_TRANSPORT_LOAD:
-    return "ui_name_transport_load";
-  case ACTION_TRANSPORT_LOAD2:
-    return "ui_name_transport_load_2";
-  case ACTION_TRANSPORT_LOAD3:
-    return "ui_name_transport_load_3";
-  case ACTION_TRANSPORT_DISEMBARK1:
-    return "ui_name_transport_disembark";
-  case ACTION_TRANSPORT_DISEMBARK2:
-    return "ui_name_transport_disembark_2";
-  case ACTION_TRANSPORT_DISEMBARK3:
-    return "ui_name_transport_disembark_3";
-  case ACTION_TRANSPORT_DISEMBARK4:
-    return "ui_name_transport_disembark_4";
-  case ACTION_HUT_ENTER:
-    return "ui_name_enter_hut";
-  case ACTION_HUT_ENTER2:
-    return "ui_name_enter_hut_2";
-  case ACTION_HUT_ENTER3:
-    return "ui_name_enter_hut_3";
-  case ACTION_HUT_ENTER4:
-    return "ui_name_enter_hut_4";
-  case ACTION_HUT_FRIGHTEN:
-    return "ui_name_frighten_hut";
-  case ACTION_HUT_FRIGHTEN2:
-    return "ui_name_frighten_hut_2";
-  case ACTION_HUT_FRIGHTEN3:
-    return "ui_name_frighten_hut_3";
-  case ACTION_HUT_FRIGHTEN4:
-    return "ui_name_frighten_hut_4";
-  case ACTION_SPY_ATTACK:
-    return "ui_name_spy_attack";
-  case ACTION_UNIT_MOVE:
-    return "ui_name_unit_move";
-  case ACTION_UNIT_MOVE2:
-    return "ui_name_unit_move_2";
-  case ACTION_UNIT_MOVE3:
-    return "ui_name_unit_move_3";
-  case ACTION_TELEPORT:
-    return "ui_name_teleport";
-  case ACTION_TELEPORT2:
-    return "ui_name_teleport_2";
-  case ACTION_TELEPORT3:
-    return "ui_name_teleport_3";
-  case ACTION_TELEPORT_CONQUER:
-    return "ui_name_teleport_conquer";
-  case ACTION_TELEPORT_FRIGHTEN:
-    return "ui_name_teleport_frighten";
-  case ACTION_TELEPORT_FRIGHTEN_CONQUER:
-    return "ui_name_teleport_frighten_conquer";
-  case ACTION_TELEPORT_ENTER:
-    return "ui_name_teleport_enter";
-  case ACTION_TELEPORT_ENTER_CONQUER:
-    return "ui_name_teleport_enter_conquer";
-  case ACTION_SPY_ESCAPE:
-    return "ui_name_escape";
-  case ACTION_USER_ACTION1:
-    return "ui_name_user_action_1";
-  case ACTION_USER_ACTION2:
-    return "ui_name_user_action_2";
-  case ACTION_USER_ACTION3:
-    return "ui_name_user_action_3";
-  case ACTION_USER_ACTION4:
-    return "ui_name_user_action_4";
-  case ACTION_GAIN_VETERANCY:
-  case ACTION_ESCAPE:
-  case ACTION_CIVIL_WAR:
-    fc_assert(!action_id_is_internal(act)); /* Fail always */
-    break;
-  case ACTION_COUNT:
-    break;
-
-  ASSERT_UNUSED_ACTION_CASES;
-  }
-
-  fc_assert(act >= 0 && act < ACTION_COUNT);
-
-  return NULL;
-}
-
 /**********************************************************************//**
   Return default ui_name for the action
 **************************************************************************/
diff --git a/common/actions.h b/common/actions.h
index cab561207b..3072ade915 100644
--- a/common/actions.h
+++ b/common/actions.h
@@ -472,8 +472,6 @@ const char *action_get_ui_name_mnemonic(action_id act_id,
 const char *action_prepare_ui_name(action_id act_id, const char *mnemonic,
                                    const struct act_prob prob,
                                    const char *custom);
-
-const char *action_ui_name_ruleset_var_name(int act);
 const char *action_ui_name_default(int act);
 
 const char *action_min_range_ruleset_var_name(int act);
-- 
2.45.2

