From 3de5292d1f014a323acdf9fd60212a7bd69f7246 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 19 Mar 2022 09:17:20 +0200 Subject: [PATCH 32/32] Rename "Recycle Unit" as "Disband Unit Recover" Requested by log65536 See osdn #42959 Signed-off-by: Marko Lindqvist --- ai/default/daicity.c | 10 ++-- ai/default/daidiplomacy.c | 2 +- client/control.c | 2 +- client/gui-qt/dialogs.cpp | 10 ++-- client/packhand.c | 2 +- client/text.c | 2 +- common/actions.c | 73 ++++++++++++++++++------------ common/actions.h | 7 ++- common/aicore/aisupport.c | 2 +- common/fc_types.h | 4 +- common/unittype.c | 2 +- data/alien/cities.ruleset | 2 +- data/alien/effects.ruleset | 4 +- data/alien/game.ruleset | 10 ++-- data/civ1/cities.ruleset | 2 +- data/civ1/effects.ruleset | 4 +- data/civ1/game.ruleset | 10 ++-- data/civ2/cities.ruleset | 2 +- data/civ2/effects.ruleset | 4 +- data/civ2/game.ruleset | 10 ++-- data/civ2civ3/cities.ruleset | 2 +- data/civ2civ3/effects.ruleset | 4 +- data/civ2civ3/game.ruleset | 10 ++-- data/classic/cities.ruleset | 2 +- data/classic/effects.ruleset | 4 +- data/classic/game.ruleset | 10 ++-- data/experimental/cities.ruleset | 2 +- data/experimental/effects.ruleset | 4 +- data/experimental/game.ruleset | 10 ++-- data/granularity/cities.ruleset | 2 +- data/multiplayer/cities.ruleset | 2 +- data/multiplayer/game.ruleset | 10 ++-- data/sandbox/cities.ruleset | 6 +-- data/sandbox/effects.ruleset | 4 +- data/sandbox/game.ruleset | 14 +++--- data/stub/cities.ruleset | 2 +- data/webperimental/cities.ruleset | 2 +- data/webperimental/effects.ruleset | 4 +- data/webperimental/game.ruleset | 6 +-- doc/README.actions | 10 ++-- doc/README.effects | 2 +- server/actiontools.c | 2 +- server/advisors/advdata.c | 2 +- server/rscompat.c | 30 ++++++++++++ server/rscompat.h | 5 ++ server/rssanity.c | 30 ++++++------ server/ruleset.c | 38 ++++++++++++---- server/savegame/savecompat.c | 71 +++++++++++++++++++++++++++-- server/savegame/savegame2.c | 6 +-- server/unithand.c | 14 +++--- 50 files changed, 308 insertions(+), 166 deletions(-) diff --git a/ai/default/daicity.c b/ai/default/daicity.c index c391e7e20b..090abee14a 100644 --- a/ai/default/daicity.c +++ b/ai/default/daicity.c @@ -482,18 +482,18 @@ static void unit_do_disband_trad(struct player *owner, struct unit *punit, /* Disbanding a unit inside a city gives it 50% of the shields used to * produce the unit. */ - if (unit_can_do_action(punit, ACTION_RECYCLE_UNIT)) { + if (unit_can_do_action(punit, ACTION_DISBAND_UNIT_RECOVER)) { struct city *tgt_city; /* Only a city at the same tile as the unit can benefit. */ tgt_city = tile_city(unit_tile(punit)); if (tgt_city - && is_action_enabled_unit_on_city(ACTION_RECYCLE_UNIT, + && is_action_enabled_unit_on_city(ACTION_DISBAND_UNIT_RECOVER, punit, tgt_city)) { if (unit_perform_action(owner, punit->id, tgt_city->id, - 0, NULL, ACTION_RECYCLE_UNIT, requester)) { - /* The unit did Recycle Unit. 50% of the shields wasted. */ + 0, NULL, ACTION_DISBAND_UNIT_RECOVER, requester)) { + /* The unit did Disband Unit Recover. 50% of the shields wasted. */ return; } } @@ -1259,7 +1259,7 @@ static int action_target_neg_util(action_id act_id, case ACTRES_TRADE_ROUTE: case ACTRES_HELP_WONDER: case ACTRES_JOIN_CITY: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_HOME_CITY: case ACTRES_UPGRADE_UNIT: case ACTRES_AIRLIFT: diff --git a/ai/default/daidiplomacy.c b/ai/default/daidiplomacy.c index f42907a205..d5678d87fe 100644 --- a/ai/default/daidiplomacy.c +++ b/ai/default/daidiplomacy.c @@ -1990,7 +1990,7 @@ void dai_incident(struct ai_type *ait, enum incident_type type, case ACTRES_MARKETPLACE: case ACTRES_HELP_WONDER: case ACTRES_JOIN_CITY: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_DISBAND_UNIT: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: diff --git a/client/control.c b/client/control.c index 0b5a7215de..b3f36e0452 100644 --- a/client/control.c +++ b/client/control.c @@ -68,7 +68,7 @@ struct client_disband_unit_data { * user configurable client option? */ static int disband_unit_alternatives[3] = { ACTION_DISBAND_UNIT, - ACTION_RECYCLE_UNIT, + ACTION_DISBAND_UNIT_RECOVER, ACTION_HELP_WONDER, }; diff --git a/client/gui-qt/dialogs.cpp b/client/gui-qt/dialogs.cpp index 0652c3673d..dbaa1653b8 100644 --- a/client/gui-qt/dialogs.cpp +++ b/client/gui-qt/dialogs.cpp @@ -109,7 +109,7 @@ static void diplomat_bribe(QVariant data1, QVariant data2); static void caravan_marketplace(QVariant data1, QVariant data2); static void caravan_establish_trade(QVariant data1, QVariant data2); static void caravan_help_build(QVariant data1, QVariant data2); -static void unit_recycle(QVariant data1, QVariant data2); +static void unit_disband_recover(QVariant data1, QVariant data2); static void capture_units(QVariant data1, QVariant data2); static void nuke_units(QVariant data1, QVariant data2); static void expel_unit(QVariant data1, QVariant data2); @@ -226,7 +226,7 @@ static const QHash af_map_init(void) action_function[ACTION_SPY_NUKE] = spy_nuke_city; action_function[ACTION_SPY_NUKE_ESC] = spy_nuke_city_esc; action_function[ACTION_DESTROY_CITY] = destroy_city; - action_function[ACTION_RECYCLE_UNIT] = unit_recycle; + action_function[ACTION_DISBAND_UNIT_RECOVER] = unit_disband_recover; action_function[ACTION_HOME_CITY] = unit_home_city; action_function[ACTION_UPGRADE_UNIT] = unit_upgrade; action_function[ACTION_AIRLIFT] = airlift; @@ -1741,16 +1741,16 @@ static void caravan_help_build(QVariant data1, QVariant data2) } /***********************************************************************//** - Action Recycle Unit for choice dialog + Action Disband Unit Recover for choice dialog ***************************************************************************/ -static void unit_recycle(QVariant data1, QVariant data2) +static void unit_disband_recover(QVariant data1, QVariant data2) { int actor_id = data1.toInt(); int tgt_city_id = data2.toInt(); if (NULL != game_unit_by_number(actor_id) && NULL != game_city_by_number(tgt_city_id)) { - request_do_action(ACTION_RECYCLE_UNIT, + request_do_action(ACTION_DISBAND_UNIT_RECOVER, actor_id, tgt_city_id, 0, ""); } } diff --git a/client/packhand.c b/client/packhand.c index 79b8f2287c..0908fefc5b 100644 --- a/client/packhand.c +++ b/client/packhand.c @@ -181,7 +181,7 @@ const action_id auto_attack_blockers[] = { ACTION_SPY_NUKE, ACTION_SPY_NUKE_ESC, ACTION_DESTROY_CITY, ACTION_EXPEL_UNIT, - ACTION_RECYCLE_UNIT, + ACTION_DISBAND_UNIT_RECOVER, ACTION_HOME_CITY, ACTION_HOMELESS, ACTION_UPGRADE_UNIT, diff --git a/client/text.c b/client/text.c index 79d8c80408..9d1c0a9a51 100644 --- a/client/text.c +++ b/client/text.c @@ -1738,7 +1738,7 @@ const char *get_act_sel_action_custom_text(struct action *paction, return NULL; } } else if ((action_has_result(paction, ACTRES_HELP_WONDER) - || action_has_result(paction, ACTRES_RECYCLE_UNIT)) + || action_has_result(paction, ACTRES_DISBAND_UNIT_RECOVER)) && city_owner(target_city) == client.conn.playing) { /* Can only give remaining production for domestic and existing * cities. */ diff --git a/common/actions.c b/common/actions.c index 685ce6c59e..585685386e 100644 --- a/common/actions.c +++ b/common/actions.c @@ -1123,8 +1123,8 @@ static void hard_code_actions(void) unit_action_new(ACTION_EXPEL_UNIT, ACTRES_EXPEL_UNIT, FALSE, TRUE, MAK_STAYS, 0, 1, FALSE); - actions[ACTION_RECYCLE_UNIT] = - unit_action_new(ACTION_RECYCLE_UNIT, ACTRES_RECYCLE_UNIT, + actions[ACTION_DISBAND_UNIT_RECOVER] = + unit_action_new(ACTION_DISBAND_UNIT_RECOVER, ACTRES_DISBAND_UNIT_RECOVER, TRUE, TRUE, MAK_STAYS, /* Illegal to perform to a target on another tile to * keep the rules exactly as they were for now. */ @@ -1692,7 +1692,10 @@ struct action *action_by_number(action_id act_id) struct action *action_by_rule_name(const char *name) { /* Actions are still hard coded in the gen_action enum. */ - action_id act_id = gen_action_by_name(name, fc_strcasecmp); + action_id act_id; + const char *current_name = gen_action_name_update_cb(name); + + act_id = gen_action_by_name(current_name, fc_strcasecmp); if (!action_id_exists(act_id)) { /* Nothing to return. */ @@ -2265,7 +2268,7 @@ bool action_creates_extra(const struct action *paction, case ACTRES_NUKE_UNITS: case ACTRES_DESTROY_CITY: case ACTRES_EXPEL_UNIT: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_DISBAND_UNIT: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: @@ -2350,7 +2353,7 @@ bool action_removes_extra(const struct action *paction, case ACTRES_NUKE_UNITS: case ACTRES_DESTROY_CITY: case ACTRES_EXPEL_UNIT: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_DISBAND_UNIT: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: @@ -3087,7 +3090,7 @@ tgt_city_local_utype(const struct city *target_city) different target kind. The target tile could therefore be missing. Example: The ATK_SELF action ACTION_DISBAND_UNIT can be blocked by the - ATK_CITY action ACTION_RECYCLE_UNIT. + ATK_CITY action ACTION_DISBAND_UNIT_RECOVER. **************************************************************************/ static const struct tile * blocked_find_target_tile(const struct action *act, @@ -3142,7 +3145,7 @@ blocked_find_target_tile(const struct action *act, missing. Example: The ATK_SELF action ACTION_DISBAND_UNIT can be blocked by the - ATK_CITY action ACTION_RECYCLE_UNIT. + ATK_CITY action ACTION_DISBAND_UNIT_RECOVER. **************************************************************************/ static const struct city * blocked_find_target_city(const struct action *act, @@ -3446,7 +3449,7 @@ action_actor_utype_hard_reqs_ok_full(const struct action *paction, case ACTRES_NUKE_UNITS: case ACTRES_DESTROY_CITY: case ACTRES_EXPEL_UNIT: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_DISBAND_UNIT: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: @@ -3632,7 +3635,7 @@ action_hard_reqs_actor(const struct action *paction, case ACTRES_NUKE_UNITS: case ACTRES_DESTROY_CITY: case ACTRES_EXPEL_UNIT: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_DISBAND_UNIT: case ACTRES_HOME_CITY: case ACTRES_UPGRADE_UNIT: @@ -3872,7 +3875,7 @@ is_action_possible(const action_id wanted_action, break; case ACTRES_HELP_WONDER: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: /* It is only possible to help the production if the production needs * the help. (If not it would be possible to add shields for something * that can't legally receive help if it is build later) */ @@ -5593,7 +5596,7 @@ action_prob(const action_id wanted_action, /* No battle is fought first. */ chance = ACTPROB_CERTAIN; break; - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: /* No battle is fought first. */ chance = ACTPROB_CERTAIN; break; @@ -6957,7 +6960,7 @@ int action_dice_roll_initial_odds(const struct action *paction) case ACTRES_NUKE_UNITS: case ACTRES_DESTROY_CITY: case ACTRES_EXPEL_UNIT: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_DISBAND_UNIT: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: @@ -7459,8 +7462,8 @@ const char *action_ui_name_ruleset_var_name(int act) return "ui_name_nuke_units"; case ACTION_DESTROY_CITY: return "ui_name_destroy_city"; - case ACTION_RECYCLE_UNIT: - return "ui_name_recycle_unit"; + case ACTION_DISBAND_UNIT_RECOVER: + return "ui_name_disband_unit_recover"; case ACTION_DISBAND_UNIT: return "ui_name_disband_unit"; case ACTION_HOME_CITY: @@ -7728,7 +7731,7 @@ const char *action_ui_name_default(int act) case ACTION_DESTROY_CITY: /* TRANS: Destroy _City (100% chance of success). */ return N_("Destroy %sCity%s"); - case ACTION_RECYCLE_UNIT: + case ACTION_DISBAND_UNIT_RECOVER: /* TRANS: Dis_band recovering production (100% chance of success). */ return N_("Dis%sband recovering production%s"); case ACTION_DISBAND_UNIT: @@ -7936,7 +7939,7 @@ const char *action_min_range_ruleset_var_name(int act) case ACTION_SPY_NUKE: case ACTION_SPY_NUKE_ESC: case ACTION_DESTROY_CITY: - case ACTION_RECYCLE_UNIT: + case ACTION_DISBAND_UNIT_RECOVER: case ACTION_DISBAND_UNIT: case ACTION_HOME_CITY: case ACTION_HOMELESS: @@ -8052,7 +8055,7 @@ int action_min_range_default(enum action_result result) case ACTRES_SPY_NUKE: case ACTRES_DESTROY_CITY: case ACTRES_EXPEL_UNIT: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_DISBAND_UNIT: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: @@ -8208,8 +8211,8 @@ const char *action_max_range_ruleset_var_name(int act) return NULL; case ACTION_HELP_WONDER: return "help_wonder_max_range"; - case ACTION_RECYCLE_UNIT: - return "recycle_unit_max_range"; + case ACTION_DISBAND_UNIT_RECOVER: + return "disband_unit_recover_max_range"; case ACTION_BOMBARD: return "bombard_max_range"; case ACTION_BOMBARD2: @@ -8305,7 +8308,7 @@ int action_max_range_default(enum action_result result) fc_assert_msg(FALSE, "Probably wrong value."); return RS_DEFAULT_ACTION_MAX_RANGE; case ACTRES_HELP_WONDER: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: return RS_DEFAULT_ACTION_MAX_RANGE; case ACTRES_BOMBARD: return RS_DEFAULT_ACTION_MAX_RANGE; @@ -8369,7 +8372,7 @@ const char *action_target_kind_ruleset_var_name(int act) case ACTION_SPY_NUKE_ESC: case ACTION_NUKE_UNITS: case ACTION_DESTROY_CITY: - case ACTION_RECYCLE_UNIT: + case ACTION_DISBAND_UNIT_RECOVER: case ACTION_DISBAND_UNIT: case ACTION_HOME_CITY: case ACTION_HOMELESS: @@ -8482,7 +8485,7 @@ action_target_kind_default(enum action_result result) case ACTRES_STEAL_MAPS: case ACTRES_SPY_NUKE: case ACTRES_DESTROY_CITY: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_HOME_CITY: case ACTRES_UPGRADE_UNIT: case ACTRES_AIRLIFT: @@ -8570,7 +8573,7 @@ bool action_result_legal_target_kind(enum action_result result, case ACTRES_STEAL_MAPS: case ACTRES_SPY_NUKE: case ACTRES_DESTROY_CITY: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_HOME_CITY: case ACTRES_UPGRADE_UNIT: case ACTRES_AIRLIFT: @@ -8668,7 +8671,7 @@ action_sub_target_kind_default(enum action_result result) case ACTRES_STEAL_MAPS: case ACTRES_SPY_NUKE: case ACTRES_DESTROY_CITY: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: case ACTRES_UPGRADE_UNIT: @@ -8760,7 +8763,7 @@ action_target_compl_calc(enum action_result result, case ACTRES_STEAL_MAPS: case ACTRES_SPY_NUKE: case ACTRES_DESTROY_CITY: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: case ACTRES_UPGRADE_UNIT: @@ -8867,7 +8870,7 @@ const char *action_actor_consuming_always_ruleset_var_name(action_id act) case ACTION_SPY_NUKE: case ACTION_SPY_NUKE_ESC: case ACTION_DESTROY_CITY: - case ACTION_RECYCLE_UNIT: + case ACTION_DISBAND_UNIT_RECOVER: case ACTION_DISBAND_UNIT: case ACTION_HOME_CITY: case ACTION_HOMELESS: @@ -9036,7 +9039,7 @@ const char *action_blocked_by_ruleset_var_name(const struct action *act) case ACTION_SPY_NUKE: case ACTION_SPY_NUKE_ESC: case ACTION_DESTROY_CITY: - case ACTION_RECYCLE_UNIT: + case ACTION_DISBAND_UNIT_RECOVER: case ACTION_DISBAND_UNIT: case ACTION_HOME_CITY: case ACTION_HOMELESS: @@ -9167,7 +9170,7 @@ action_post_success_forced_ruleset_var_name(const struct action *act) case ACTION_SPY_NUKE: case ACTION_SPY_NUKE_ESC: case ACTION_DESTROY_CITY: - case ACTION_RECYCLE_UNIT: + case ACTION_DISBAND_UNIT_RECOVER: case ACTION_DISBAND_UNIT: case ACTION_HOME_CITY: case ACTION_HOMELESS: @@ -9244,3 +9247,17 @@ bool action_ever_possible(action_id action) { return action_enabler_list_size(action_enablers_for_action(action)) > 0; } + +/**********************************************************************//** + Specenum callback to update old enum names to current ones. +**************************************************************************/ +const char *gen_action_name_update_cb(const char *old_name) +{ + if (is_ruleset_compat_mode()) { + if (!strcasecmp("Recycle Unit", old_name)) { + return "Disband Unit Recover"; + } + } + + return old_name; +} diff --git a/common/actions.h b/common/actions.h index fb1ff2eb96..1ec10497e9 100644 --- a/common/actions.h +++ b/common/actions.h @@ -61,6 +61,8 @@ extern "C" { #define SPECENUM_COUNT ASTK_COUNT #include "specenum_gen.h" +const char *gen_action_name_update_cb(const char *old_name); + /* Values used in the network protocol. */ /* Names used in file formats but not normally shown to users. */ #define SPECENUM_NAME gen_action @@ -146,8 +148,8 @@ extern "C" { #define SPECENUM_VALUE39NAME "Destroy City" #define SPECENUM_VALUE40 ACTION_EXPEL_UNIT #define SPECENUM_VALUE40NAME "Expel Unit" -#define SPECENUM_VALUE41 ACTION_RECYCLE_UNIT -#define SPECENUM_VALUE41NAME "Recycle Unit" +#define SPECENUM_VALUE41 ACTION_DISBAND_UNIT_RECOVER +#define SPECENUM_VALUE41NAME "Disband Unit Recover" #define SPECENUM_VALUE42 ACTION_DISBAND_UNIT #define SPECENUM_VALUE42NAME "Disband Unit" #define SPECENUM_VALUE43 ACTION_HOME_CITY @@ -278,6 +280,7 @@ extern "C" { #define SPECENUM_VALUE105NAME "Unit Make Homeless" #define SPECENUM_BITVECTOR bv_actions #define SPECENUM_COUNT ACTION_COUNT +#define SPECENUM_NAME_UPDATER #include "specenum_gen.h" /* Fake action id used in searches to signal "any action at all". */ diff --git a/common/aicore/aisupport.c b/common/aicore/aisupport.c index 9da40e39ef..906795839b 100644 --- a/common/aicore/aisupport.c +++ b/common/aicore/aisupport.c @@ -133,7 +133,7 @@ int city_gold_worth(struct city *pcity) if (punittype && can_city_build_unit_direct(pcity, punittype)) { /* obsolete, candidate for disbanding */ worth += unit_shield_value(punit, unit_type_get(punit), - action_by_number(ACTION_RECYCLE_UNIT)); + action_by_number(ACTION_DISBAND_UNIT_RECOVER)); } else { worth += unit_build_shield_cost(pcity, punit); /* good stuff */ } diff --git a/common/fc_types.h b/common/fc_types.h index 40d20236fa..8bc7a8c58e 100644 --- a/common/fc_types.h +++ b/common/fc_types.h @@ -223,8 +223,8 @@ enum output_type_id { #define SPECENUM_VALUE23NAME "Unit Destroy City" #define SPECENUM_VALUE24 ACTRES_EXPEL_UNIT #define SPECENUM_VALUE24NAME "Unit Expel Unit" -#define SPECENUM_VALUE25 ACTRES_RECYCLE_UNIT -#define SPECENUM_VALUE25NAME "Unit Recycle" +#define SPECENUM_VALUE25 ACTRES_DISBAND_UNIT_RECOVER +#define SPECENUM_VALUE25NAME "Unit Disband Recover" #define SPECENUM_VALUE26 ACTRES_DISBAND_UNIT #define SPECENUM_VALUE26NAME "Unit Disband" #define SPECENUM_VALUE27 ACTRES_HOME_CITY diff --git a/common/unittype.c b/common/unittype.c index 48f5c7fcab..3264873d3d 100644 --- a/common/unittype.c +++ b/common/unittype.c @@ -340,7 +340,7 @@ static bool action_is_hostile(action_id act_id) case ACTRES_HELP_WONDER: case ACTRES_FOUND_CITY: case ACTRES_JOIN_CITY: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_DISBAND_UNIT: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: diff --git a/data/alien/cities.ruleset b/data/alien/cities.ruleset index 1b7e508de2..1ee1767047 100644 --- a/data/alien/cities.ruleset +++ b/data/alien/cities.ruleset @@ -131,5 +131,5 @@ food_wipe = TRUE gold_wipe = TRUE ; shield_protected = "EvacuateFirst" -shield_unit_act = "Help Wonder", "Recycle Unit", "Disband Unit" +shield_unit_act = "Help Wonder", "Disband Unit Recover", "Disband Unit" shield_wipe = FALSE diff --git a/data/alien/effects.ruleset b/data/alien/effects.ruleset index 670a31cd27..25c62129e9 100644 --- a/data/alien/effects.ruleset +++ b/data/alien/effects.ruleset @@ -1103,8 +1103,8 @@ reqs = type = "Unit_Shield_Value_Pct" value = -50 reqs = - { "type", "name", "range", "present" - "Action", "Recycle Unit", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Disband Unit Recover", "Local", TRUE } [effect_unit_shield_value_in_upgrade_price_calc] diff --git a/data/alien/game.ruleset b/data/alien/game.ruleset index 68513dc797..c91159b6bd 100644 --- a/data/alien/game.ruleset +++ b/data/alien/game.ruleset @@ -371,12 +371,12 @@ escape_city = "Transport Embark", "Enter Hut", "Enter Hut 2", "Unit Move" help_wonder_max_range = 1 ; The maximum distance from the actor unit to the target of the -; "Recycle Unit" action. The value 0 means that the target`s tile must be the +; "Disband Unit Recover" action. The value 0 means that the target`s tile must be the ; tile of the actor unit. The value 1 means that the city must be on a tile ; adjacent to the actor unit. The special value "unlimited" lifts the ; maximum distance restriction. The maximum distance can`t be smaller than ; the minimum distance. -recycle_unit_max_range = 1 +disband_unit_recover_max_range = 1 ; The maximum distance from the actor unit to the target of the "Bombard" ; action. The value 1 means that the targets must be on a tile adjacent to @@ -492,7 +492,7 @@ ui_name_enter_marketplace = _("Monetize %sContainers%s") ui_name_help_wonder = _("Help %sbuild Wonder%s") ; /* TRANS: Dis_band recovering production (100% chance of success). */ -ui_name_recycle_unit = _("Dis%sband recovering production%s") +ui_name_disband_unit_recover = _("Dis%sband recovering production%s") ; /* TRANS: Dis_band without recovering production (100% chance of success). */ ui_name_disband_unit = _("Dis%sband without recovering production%s") @@ -733,8 +733,8 @@ target_reqs = "BuildingGenus", "GreatWonder", "Local" } -[actionenabler_recycle_unit] -action = "Recycle Unit" +[actionenabler_disband_unit_recover] +action = "Disband Unit Recover" actor_reqs = { "type", "name", "range", "present" "DiplRel", "War", "Local", FALSE diff --git a/data/civ1/cities.ruleset b/data/civ1/cities.ruleset index ae06d50673..12b05f76bf 100644 --- a/data/civ1/cities.ruleset +++ b/data/civ1/cities.ruleset @@ -131,5 +131,5 @@ food_wipe = TRUE gold_wipe = TRUE ; shield_protected = "EvacuateFirst" -shield_unit_act = "Help Wonder", "Recycle Unit", "Disband Unit" +shield_unit_act = "Help Wonder", "Disband Unit Recover", "Disband Unit" shield_wipe = FALSE diff --git a/data/civ1/effects.ruleset b/data/civ1/effects.ruleset index 7a250f3ad0..414ac061b1 100644 --- a/data/civ1/effects.ruleset +++ b/data/civ1/effects.ruleset @@ -1508,6 +1508,6 @@ reqs = type = "Unit_Shield_Value_Pct" value = -50 reqs = - { "type", "name", "range", "present" - "Action", "Recycle Unit", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Disband Unit Recover", "Local", TRUE } diff --git a/data/civ1/game.ruleset b/data/civ1/game.ruleset index 51ffa784ed..38b556191a 100644 --- a/data/civ1/game.ruleset +++ b/data/civ1/game.ruleset @@ -357,12 +357,12 @@ escape_city = "Transport Embark", "Enter Hut", "Enter Hut 2", "Unit Move" help_wonder_max_range = 1 ; The maximum distance from the actor unit to the target of the -; "Recycle Unit" action. The value 0 means that the target`s tile must be the +; "Disband Unit Recover" action. The value 0 means that the target`s tile must be the ; tile of the actor unit. The value 1 means that the city must be on a tile ; adjacent to the actor unit. The special value "unlimited" lifts the ; maximum distance restriction. The maximum distance can`t be smaller than ; the minimum distance. -recycle_unit_max_range = 1 +disband_unit_recover_max_range = 1 ; The maximum distance from the actor unit to the target of the "Bombard" ; action. The value 1 means that the targets must be on a tile adjacent to @@ -474,7 +474,7 @@ ui_name_enter_marketplace = _("Enter %sMarketplace%s") ui_name_help_wonder = _("Help %sbuild Wonder%s") ; /* TRANS: Dis_band recovering production (100% chance of success). */ -ui_name_recycle_unit = _("Dis%sband recovering production%s") +ui_name_disband_unit_recover = _("Dis%sband recovering production%s") ; /* TRANS: Dis_band without recovering production (100% chance of success). */ ui_name_disband_unit = _("Dis%sband without recovering production%s") @@ -715,8 +715,8 @@ target_reqs = "BuildingGenus", "GreatWonder", "Local" } -[actionenabler_recycle_unit] -action = "Recycle Unit" +[actionenabler_disband_unit_recover] +action = "Disband Unit Recover" actor_reqs = { "type", "name", "range", "present" "DiplRel", "War", "Local", FALSE diff --git a/data/civ2/cities.ruleset b/data/civ2/cities.ruleset index ae06d50673..12b05f76bf 100644 --- a/data/civ2/cities.ruleset +++ b/data/civ2/cities.ruleset @@ -131,5 +131,5 @@ food_wipe = TRUE gold_wipe = TRUE ; shield_protected = "EvacuateFirst" -shield_unit_act = "Help Wonder", "Recycle Unit", "Disband Unit" +shield_unit_act = "Help Wonder", "Disband Unit Recover", "Disband Unit" shield_wipe = FALSE diff --git a/data/civ2/effects.ruleset b/data/civ2/effects.ruleset index 95a4895123..2c80ef8c5d 100644 --- a/data/civ2/effects.ruleset +++ b/data/civ2/effects.ruleset @@ -2581,8 +2581,8 @@ reqs = type = "Unit_Shield_Value_Pct" value = -50 reqs = - { "type", "name", "range", "present" - "Action", "Recycle Unit", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Disband Unit Recover", "Local", TRUE } [effect_unit_shield_value_in_upgrade_price_calc] diff --git a/data/civ2/game.ruleset b/data/civ2/game.ruleset index 94db5e6e77..d6cca716dc 100644 --- a/data/civ2/game.ruleset +++ b/data/civ2/game.ruleset @@ -356,12 +356,12 @@ poison_empties_food_stock = FALSE help_wonder_max_range = 1 ; The maximum distance from the actor unit to the target of the -; "Recycle Unit" action. The value 0 means that the target`s tile must be the +; "Disband Unit Recover" action. The value 0 means that the target`s tile must be the ; tile of the actor unit. The value 1 means that the city must be on a tile ; adjacent to the actor unit. The special value "unlimited" lifts the ; maximum distance restriction. The maximum distance can`t be smaller than ; the minimum distance. -recycle_unit_max_range = 1 +disband_unit_recover_max_range = 1 ; The maximum distance from the actor unit to the target of the "Bombard" ; action. The value 1 means that the targets must be on a tile adjacent to @@ -513,7 +513,7 @@ ui_name_enter_marketplace = _("Enter %sMarketplace%s") ui_name_help_wonder = _("Help %sbuild Wonder%s") ; /* TRANS: Dis_band recovering production (100% chance of success). */ -ui_name_recycle_unit = _("Dis%sband recovering production%s") +ui_name_disband_unit_recover = _("Dis%sband recovering production%s") ; /* TRANS: Dis_band without recovering production (100% chance of success). */ ui_name_disband_unit = _("Dis%sband without recovering production%s") @@ -887,8 +887,8 @@ target_reqs = "BuildingGenus", "GreatWonder", "Local" } -[actionenabler_recycle_unit] -action = "Recycle Unit" +[actionenabler_disband_unit_recover] +action = "Disband Unit Recover" actor_reqs = { "type", "name", "range", "present" "DiplRel", "War", "Local", FALSE diff --git a/data/civ2civ3/cities.ruleset b/data/civ2civ3/cities.ruleset index 5d3e36135f..0d356fbbb3 100644 --- a/data/civ2civ3/cities.ruleset +++ b/data/civ2civ3/cities.ruleset @@ -135,5 +135,5 @@ food_wipe = TRUE gold_wipe = TRUE shield_protected = "EvacuateFirst" -shield_unit_act = "Help Wonder", "Recycle Unit", "Disband Unit" +shield_unit_act = "Help Wonder", "Disband Unit Recover", "Disband Unit" shield_wipe = FALSE diff --git a/data/civ2civ3/effects.ruleset b/data/civ2civ3/effects.ruleset index 4125804155..39915fd029 100644 --- a/data/civ2civ3/effects.ruleset +++ b/data/civ2civ3/effects.ruleset @@ -4614,8 +4614,8 @@ reqs = type = "Unit_Shield_Value_Pct" value = -50 reqs = - { "type", "name", "range", "present" - "Action", "Recycle Unit", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Disband Unit Recover", "Local", TRUE } [effect_unit_shield_value_in_upgrade_price_calc] diff --git a/data/civ2civ3/game.ruleset b/data/civ2civ3/game.ruleset index 8b9a2aaf0d..1bd14677b6 100644 --- a/data/civ2civ3/game.ruleset +++ b/data/civ2civ3/game.ruleset @@ -398,12 +398,12 @@ poison_empties_food_stock = FALSE help_wonder_max_range = 1 ; The maximum distance from the actor unit to the target of the -; "Recycle Unit" action. The value 0 means that the target`s tile must be the +; "Disband Unit Recover" action. The value 0 means that the target`s tile must be the ; tile of the actor unit. The value 1 means that the city must be on a tile ; adjacent to the actor unit. The special value "unlimited" lifts the ; maximum distance restriction. The maximum distance can`t be smaller than ; the minimum distance. -recycle_unit_max_range = 1 +disband_unit_recover_max_range = 1 ; The maximum distance from the actor unit to the target of the "Bombard" ; action. The value 1 means that the targets must be on a tile adjacent to @@ -552,7 +552,7 @@ ui_name_enter_marketplace = _("Enter %sMarketplace%s") ui_name_help_wonder = _("Help %sbuild Wonder%s") ; /* TRANS: Dis_band recovering production (100% chance of success). */ -ui_name_recycle_unit = _("Dis%sband recovering production%s") +ui_name_disband_unit_recover = _("Dis%sband recovering production%s") ; /* TRANS: Dis_band without recovering production (100% chance of success). */ ui_name_disband_unit = _("Dis%sband without recovering production%s") @@ -989,8 +989,8 @@ target_reqs = "BuildingGenus", "GreatWonder", "Local" } -[actionenabler_recycle_unit] -action = "Recycle Unit" +[actionenabler_disband_unit_recover] +action = "Disband Unit Recover" actor_reqs = { "type", "name", "range", "present" "UnitFlag", "EvacuateFirst", "Local", FALSE diff --git a/data/classic/cities.ruleset b/data/classic/cities.ruleset index 0a7f527fb9..5786d704f7 100644 --- a/data/classic/cities.ruleset +++ b/data/classic/cities.ruleset @@ -132,5 +132,5 @@ food_wipe = TRUE gold_wipe = TRUE shield_protected = "EvacuateFirst" -shield_unit_act = "Help Wonder", "Recycle Unit", "Disband Unit" +shield_unit_act = "Help Wonder", "Disband Unit Recover", "Disband Unit" shield_wipe = FALSE diff --git a/data/classic/effects.ruleset b/data/classic/effects.ruleset index c169892169..8210e79c53 100644 --- a/data/classic/effects.ruleset +++ b/data/classic/effects.ruleset @@ -2653,8 +2653,8 @@ reqs = type = "Unit_Shield_Value_Pct" value = -50 reqs = - { "type", "name", "range", "present" - "Action", "Recycle Unit", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Disband Unit Recover", "Local", TRUE } [effect_unit_shield_value_in_upgrade_price_calc] diff --git a/data/classic/game.ruleset b/data/classic/game.ruleset index c2c22ee2f7..dd94da180c 100644 --- a/data/classic/game.ruleset +++ b/data/classic/game.ruleset @@ -382,12 +382,12 @@ poison_empties_food_stock = FALSE help_wonder_max_range = 1 ; The maximum distance from the actor unit to the target of the -; "Recycle Unit" action. The value 0 means that the target`s tile must be the +; "Disband Unit Recover" action. The value 0 means that the target`s tile must be the ; tile of the actor unit. The value 1 means that the city must be on a tile ; adjacent to the actor unit. The special value "unlimited" lifts the ; maximum distance restriction. The maximum distance can`t be smaller than ; the minimum distance. -recycle_unit_max_range = 1 +disband_unit_recover_max_range = 1 ; The maximum distance from the actor unit to the target of the "Bombard" ; action. The value 1 means that the targets must be on a tile adjacent to @@ -536,7 +536,7 @@ ui_name_enter_marketplace = _("Sell %sGoods%s") ui_name_help_wonder = _("Help %sbuild Wonder%s") ; /* TRANS: Dis_band recovering production (100% chance of success). */ -ui_name_recycle_unit = _("Dis%sband recovering production%s") +ui_name_disband_unit_recover = _("Dis%sband recovering production%s") ; /* TRANS: Dis_band without recovering production (100% chance of success). */ ui_name_disband_unit = _("Dis%sband without recovering production%s") @@ -955,8 +955,8 @@ target_reqs = "BuildingGenus", "GreatWonder", "Local" } -[actionenabler_recycle_unit] -action = "Recycle Unit" +[actionenabler_disband_unit_recover] +action = "Disband Unit Recover" actor_reqs = { "type", "name", "range", "present" "UnitFlag", "EvacuateFirst", "Local", FALSE diff --git a/data/experimental/cities.ruleset b/data/experimental/cities.ruleset index a94a236f80..740de9ddd5 100644 --- a/data/experimental/cities.ruleset +++ b/data/experimental/cities.ruleset @@ -134,5 +134,5 @@ food_wipe = TRUE gold_wipe = TRUE shield_protected = "EvacuateFirst" -shield_unit_act = "Help Wonder", "Recycle Unit", "Disband Unit" +shield_unit_act = "Help Wonder", "Disband Unit Recover", "Disband Unit" shield_wipe = FALSE diff --git a/data/experimental/effects.ruleset b/data/experimental/effects.ruleset index ad10ffbad6..ef46ee88f9 100644 --- a/data/experimental/effects.ruleset +++ b/data/experimental/effects.ruleset @@ -3036,8 +3036,8 @@ reqs = type = "Unit_Shield_Value_Pct" value = -50 reqs = - { "type", "name", "range", "present" - "Action", "Recycle Unit", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Disband Unit Recover", "Local", TRUE } [effect_unit_shield_value_in_upgrade_price_calc] diff --git a/data/experimental/game.ruleset b/data/experimental/game.ruleset index bb0c386358..70b250fbc1 100644 --- a/data/experimental/game.ruleset +++ b/data/experimental/game.ruleset @@ -387,12 +387,12 @@ poison_empties_food_stock = FALSE help_wonder_max_range = 1 ; The maximum distance from the actor unit to the target of the -; "Recycle Unit" action. The value 0 means that the target`s tile must be the +; "Disband Unit Recover" action. The value 0 means that the target`s tile must be the ; tile of the actor unit. The value 1 means that the city must be on a tile ; adjacent to the actor unit. The special value "unlimited" lifts the ; maximum distance restriction. The maximum distance can`t be smaller than ; the minimum distance. -recycle_unit_max_range = 1 +disband_unit_recover_max_range = 1 ; The maximum distance from the actor unit to the target of the "Bombard" ; action. The value 1 means that the targets must be on a tile adjacent to @@ -541,7 +541,7 @@ ui_name_enter_marketplace = _("Sell %sGoods%s") ui_name_help_wonder = _("Help %sbuild Wonder%s") ; /* TRANS: Dis_band recovering production (100% chance of success). */ -ui_name_recycle_unit = _("Dis%sband recovering production%s") +ui_name_disband_unit_recover = _("Dis%sband recovering production%s") ; /* TRANS: Dis_band without recovering production (100% chance of success). */ ui_name_disband_unit = _("Dis%sband without recovering production%s") @@ -974,8 +974,8 @@ target_reqs = "BuildingGenus", "GreatWonder", "Local" } -[actionenabler_recycle_unit] -action = "Recycle Unit" +[actionenabler_disband_unit_recover] +action = "Disband Unit Recover" actor_reqs = { "type", "name", "range", "present" "UnitFlag", "EvacuateFirst", "Local", FALSE diff --git a/data/granularity/cities.ruleset b/data/granularity/cities.ruleset index 7076de8641..6369d19d6f 100644 --- a/data/granularity/cities.ruleset +++ b/data/granularity/cities.ruleset @@ -96,5 +96,5 @@ conquest_convert_pct = 0 ; percentage which converts to the new nation ; gold_wipe = TRUE ; shield_protected = "EvacuateFirst" -; shield_unit_act = "Help Wonder", "Recycle Unit", "Disband Unit" +; shield_unit_act = "Help Wonder", "Disband Unit Recover", "Disband Unit" ; shield_wipe = FALSE diff --git a/data/multiplayer/cities.ruleset b/data/multiplayer/cities.ruleset index 6e3c677b4a..4caf5be818 100644 --- a/data/multiplayer/cities.ruleset +++ b/data/multiplayer/cities.ruleset @@ -131,5 +131,5 @@ food_wipe = TRUE gold_wipe = TRUE shield_protected = "EvacuateFirst" -shield_unit_act = "Help Wonder", "Recycle Unit", "Disband Unit" +shield_unit_act = "Help Wonder", "Disband Unit Recover", "Disband Unit" shield_wipe = FALSE diff --git a/data/multiplayer/game.ruleset b/data/multiplayer/game.ruleset index 1ec6a7ed21..d799d3d5ca 100644 --- a/data/multiplayer/game.ruleset +++ b/data/multiplayer/game.ruleset @@ -382,12 +382,12 @@ poison_empties_food_stock = FALSE help_wonder_max_range = 1 ; The maximum distance from the actor unit to the target of the -; "Recycle Unit" action. The value 0 means that the target`s tile must be the +; "Disband Unit Recover" action. The value 0 means that the target`s tile must be the ; tile of the actor unit. The value 1 means that the city must be on a tile ; adjacent to the actor unit. The special value "unlimited" lifts the ; maximum distance restriction. The maximum distance can`t be smaller than ; the minimum distance. -recycle_unit_max_range = 1 +disband_unit_recover_max_range = 1 ; The maximum distance from the actor unit to the target of the "Bombard" ; action. The value 1 means that the targets must be on a tile adjacent to @@ -530,7 +530,7 @@ ui_name_investigate_city_spend_unit = _("%sInvestigate City (spends the unit)%s" ui_name_help_wonder = _("Help %sbuild Wonder%s") ; /* TRANS: Dis_band recovering production (100% chance of success). */ -ui_name_recycle_unit = _("Dis%sband recovering production%s") +ui_name_disband_unit_recover = _("Dis%sband recovering production%s") ; /* TRANS: Dis_band without recovering production (100% chance of success). */ ui_name_disband_unit = _("Dis%sband without recovering production%s") @@ -946,8 +946,8 @@ target_reqs = "Building", "Palace", "Local", FALSE } -[actionenabler_recycle_unit] -action = "Recycle Unit" +[actionenabler_disband_unit_recover] +action = "Disband Unit Recover" actor_reqs = { "type", "name", "range", "present" "UnitFlag", "EvacuateFirst", "Local", FALSE diff --git a/data/sandbox/cities.ruleset b/data/sandbox/cities.ruleset index 7125351b1a..c2711b5eda 100644 --- a/data/sandbox/cities.ruleset +++ b/data/sandbox/cities.ruleset @@ -127,17 +127,17 @@ conquest_convert_pct = 25 ; percentage which converts to the new nation food_protected = "GameLoss" food_unit_act = "Explode Nuclear", "Help Wonder", "Join City", "Establish Trade Route", "Enter Marketplace", - "Recycle Unit" + "Disband Unit Recover" food_wipe = TRUE gold_protected = "GameLoss" gold_unit_act = "Explode Nuclear", "Help Wonder", "Join City", "Establish Trade Route", "Enter Marketplace", - "Recycle Unit" + "Disband Unit Recover" gold_wipe = TRUE shield_protected = "GameLoss" shield_unit_act = "Explode Nuclear", "Help Wonder", "Join City", "Establish Trade Route", "Enter Marketplace", - "Recycle Unit" + "Disband Unit Recover" shield_wipe = TRUE diff --git a/data/sandbox/effects.ruleset b/data/sandbox/effects.ruleset index b1872f84ef..dfb835c20d 100644 --- a/data/sandbox/effects.ruleset +++ b/data/sandbox/effects.ruleset @@ -5304,8 +5304,8 @@ reqs = type = "Unit_Shield_Value_Pct" value = -50 reqs = - { "type", "name", "range", "present" - "Action", "Recycle Unit", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Disband Unit Recover", "Local", TRUE } [effect_unit_shield_value_in_upgrade_price_calc] diff --git a/data/sandbox/game.ruleset b/data/sandbox/game.ruleset index 720cf3b104..4a1fba3754 100644 --- a/data/sandbox/game.ruleset +++ b/data/sandbox/game.ruleset @@ -398,12 +398,12 @@ steal_maps_reveals_all_cities = TRUE help_wonder_max_range = 1 ; The maximum distance from the actor unit to the target of the -; "Recycle Unit" action. The value 0 means that the target`s tile must be the +; "Disband Unit Recover" action. The value 0 means that the target`s tile must be the ; tile of the actor unit. The value 1 means that the city must be on a tile ; adjacent to the actor unit. The special value "unlimited" lifts the ; maximum distance restriction. The maximum distance can`t be smaller than ; the minimum distance. -recycle_unit_max_range = 1 +disband_unit_recover_max_range = 1 ; The maximum distance from the actor unit to the target of the "Bombard" ; action. The value 1 means that the targets must be on a tile adjacent to @@ -558,7 +558,7 @@ ui_name_enter_marketplace = _("Enter %sMarketplace%s") ui_name_help_wonder = _("Help %sbuild Wonder%s") ; /* TRANS: Dis_band recovering production (100% chance of success). */ -ui_name_recycle_unit = _("Dis%sband recovering production%s") +ui_name_disband_unit_recover = _("Dis%sband recovering production%s") ; /* TRANS: Dis_band without recovering production (100% chance of success). */ ui_name_disband_unit = _("Dis%sband without recovering production%s") @@ -1351,8 +1351,8 @@ target_reqs = "Building", "Treuga Dei", "Local" } -[actionenabler_recycle_unit] -action = "Recycle Unit" +[actionenabler_disband_unit_recover] +action = "Disband Unit Recover" actor_reqs = { "type", "name", "range", "present" "UnitFlag", "EvacuateFirst", "Local", FALSE @@ -1363,8 +1363,8 @@ actor_reqs = "DiplRel", "Peace", "Local", FALSE } -[actionenabler_recycle_unit_consensus] -action = "Recycle Unit" +[actionenabler_disband_unit_recover_consensus] +action = "Disband Unit Recover" actor_reqs = { "type", "name", "range", "present" "UnitFlag", "EvacuateFirst", "Local", FALSE diff --git a/data/stub/cities.ruleset b/data/stub/cities.ruleset index bce675b7c5..6fef264851 100644 --- a/data/stub/cities.ruleset +++ b/data/stub/cities.ruleset @@ -90,5 +90,5 @@ conquest_convert_pct = 0 ; percentage which converts to the new nation ; gold_wipe = TRUE ; shield_protected = "EvacuateFirst" -; shield_unit_act = "Help Wonder", "Recycle Unit", "Disband Unit" +; shield_unit_act = "Help Wonder", "Disband Unit Recover", "Disband Unit" ; shield_wipe = FALSE diff --git a/data/webperimental/cities.ruleset b/data/webperimental/cities.ruleset index 5fcea2f8e5..368d55d981 100644 --- a/data/webperimental/cities.ruleset +++ b/data/webperimental/cities.ruleset @@ -132,5 +132,5 @@ food_wipe = TRUE gold_wipe = TRUE shield_protected = "EvacuateFirst" -shield_unit_act = "Help Wonder", "Recycle Unit", "Disband Unit" +shield_unit_act = "Help Wonder", "Disband Unit Recover", "Disband Unit" shield_wipe = FALSE diff --git a/data/webperimental/effects.ruleset b/data/webperimental/effects.ruleset index e0f4ec3974..7c9318d7e5 100644 --- a/data/webperimental/effects.ruleset +++ b/data/webperimental/effects.ruleset @@ -2923,8 +2923,8 @@ reqs = type = "Unit_Shield_Value_Pct" value = -50 reqs = - { "type", "name", "range", "present" - "Action", "Recycle Unit", "Local", TRUE + { "type", "name", "range", "present" + "Action", "Disband Unit Recover", "Local", TRUE } [effect_unit_shield_value_in_upgrade_price_calc] diff --git a/data/webperimental/game.ruleset b/data/webperimental/game.ruleset index 99a243a022..79a25251d7 100644 --- a/data/webperimental/game.ruleset +++ b/data/webperimental/game.ruleset @@ -524,7 +524,7 @@ ui_name_enter_marketplace = _("Sell %sGoods%s") ui_name_help_wonder = _("Help %sbuild Wonder%s") ; /* TRANS: Dis_band recovering production (100% chance of success). */ -ui_name_recycle_unit = _("Dis%sband recovering production%s") +ui_name_disband_unit_recover = _("Dis%sband recovering production%s") ; /* TRANS: Dis_band without recovering production (100% chance of success). */ ui_name_disband_unit = _("Dis%sband without recovering production%s") @@ -1110,8 +1110,8 @@ target_reqs = "BuildingGenus", "GreatWonder", "Local" } -[actionenabler_recycle_unit] -action = "Recycle Unit" +[actionenabler_disband_unit_recover] +action = "Disband Unit Recover" actor_reqs = { "type", "name", "range", "present" "UnitFlag", "EvacuateFirst", "Local", FALSE diff --git a/doc/README.actions b/doc/README.actions index 385df39eab..01b22544e9 100644 --- a/doc/README.actions +++ b/doc/README.actions @@ -462,14 +462,14 @@ Actions done by a unit against a city help_wonder_max_range is 1) * target city must need the extra shields to complete its production. -"Recycle Unit" - Add half the shields used to build the unit to target - * UI name can be set using ui_name_recycle_unit +"Disband Unit Recover" - Add half the shields used to build the unit to target + * UI name can be set using ui_name_disband_unit_recover * adjustable with the Unit_Shield_Value_Pct effect * actor must be aware that the target exists * "Help Wonder" must be impossible * actor must be on the same tile as the target unless - recycle_unit_max_range allows it to be further away. (Default - recycle_unit_max_range is 1) + disband_unit_recover_max_range allows it to be further away. (Default + disband_unit_recover_max_range is 1) * target city must need the extra shields to complete its production. "Join City" - Add the actor to the target city's population. @@ -1354,7 +1354,7 @@ Actions done by a unit to it self to the shield stock of any city even if the unit is located inside it. * UI name can be set using ui_name_disband_unit * "Help Wonder" must be impossible - * "Recycle Unit" must be impossible + * "Disband Unit Recover" must be impossible "Fortify" - Fortify at tile * UI name can be set using ui_name_fortify diff --git a/doc/README.effects b/doc/README.effects index a135b1763a..8a79522e39 100644 --- a/doc/README.effects +++ b/doc/README.effects @@ -589,7 +589,7 @@ Upgrade_Price_Pct Unit_Shield_Value_Pct Increase the unit's value in shields by amount percent. When this effect is used to determine how many shields the player gets for the actions -"Recycle Unit" and "Help Wonder" it gets access to unit state. When it is +"Disband Unit Recover" and "Help Wonder" it gets access to unit state. When it is used to influence the gold cost of "Upgrade Unit" it only has access to unit type. diff --git a/server/actiontools.c b/server/actiontools.c index c5bb567ccc..14728e9c98 100644 --- a/server/actiontools.c +++ b/server/actiontools.c @@ -46,7 +46,7 @@ static void action_success_actor_consume(struct action *paction, if (unit_is_alive(actor_id) && utype_is_consumed_by_action(paction, unit_type_get(actor))) { if (action_has_result(paction, ACTRES_DISBAND_UNIT) - || action_has_result(paction, ACTRES_RECYCLE_UNIT)) { + || action_has_result(paction, ACTRES_DISBAND_UNIT_RECOVER)) { wipe_unit(actor, ULR_DISBANDED, NULL); } else if (action_has_result(paction, ACTRES_NUKE) || action_has_result(paction, ACTRES_NUKE_UNITS)) { diff --git a/server/advisors/advdata.c b/server/advisors/advdata.c index d8f2b089f0..b5b0046da5 100644 --- a/server/advisors/advdata.c +++ b/server/advisors/advdata.c @@ -894,7 +894,7 @@ adv_want adv_gov_action_immunity_want(struct government *gov) case ACTRES_TRADE_ROUTE: case ACTRES_JOIN_CITY: case ACTRES_HELP_WONDER: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: case ACTRES_UPGRADE_UNIT: diff --git a/server/rscompat.c b/server/rscompat.c index 5a18a680ea..9d804654cb 100644 --- a/server/rscompat.c +++ b/server/rscompat.c @@ -2068,3 +2068,33 @@ void rscompat_extra_adjust_3_1(struct rscompat_info *compat, } } } + +/**********************************************************************//** + Adjust freeciv-3.0 ruleset action ui_name to freeciv-3.1 +**************************************************************************/ +const char *rscompat_action_ui_name_S3_1(struct rscompat_info *compat, + int act_id) +{ + if (compat->compat_mode && compat->ver_game < RSFORMAT_3_1) { + if (act_id == ACTION_DISBAND_UNIT_RECOVER) { + return "ui_name_recycle_unit"; + } + } + + return NULL; +} + +/**********************************************************************//** + Adjust freeciv-3.0 ruleset action max_range to freeciv-3.1 +**************************************************************************/ +const char *rscompat_action_max_range_name_S3_1(struct rscompat_info *compat, + int act_id) +{ + if (compat->compat_mode && compat->ver_game < RSFORMAT_3_1) { + if (act_id == ACTION_DISBAND_UNIT_RECOVER) { + return "recycle_unit_max_range"; + } + } + + return NULL; +} diff --git a/server/rscompat.h b/server/rscompat.h index c4448e1458..59a496a922 100644 --- a/server/rscompat.h +++ b/server/rscompat.h @@ -83,6 +83,11 @@ void rscompat_extra_adjust_3_1(struct rscompat_info *compat, bool rscompat_old_slow_invasions_3_1(struct rscompat_info *compat, bool slow_invasions); +const char *rscompat_action_ui_name_S3_1(struct rscompat_info *compat, + int act_id); +const char *rscompat_action_max_range_name_S3_1(struct rscompat_info *compat, + int act_id); + #ifdef __cplusplus } #endif /* __cplusplus */ diff --git a/server/rssanity.c b/server/rssanity.c index 8ee21b9762..51e8cca835 100644 --- a/server/rssanity.c +++ b/server/rssanity.c @@ -1376,34 +1376,34 @@ bool autoadjust_ruleset_data(void) const enum action_result blocked; const enum action_result blocker; } must_block[] = { - /* Hard code that Help Wonder blocks Recycle Unit. This must be done + /* Hard code that Help Wonder blocks Disband Unit Recover. This must be done * because caravan_shields makes it possible to avoid the - * consequences of choosing to do Recycle Unit rather than having it + * consequences of choosing to do Disband Unit Recover rather than having it * do Help Wonder. * - * Explanation: Recycle Unit adds 50% of the shields used to produce + * Explanation: Disband Unit Recover adds 50% of the shields used to produce * the unit to the production of the city where it is located. Help - * Wonder adds 100%. If a unit that can do Help Wonder is recycled in - * a city and the production later is changed to something that can - * receive help from Help Wonder the remaining 50% of the shields are - * added. This can be done because the city remembers them in - * caravan_shields. + * Wonder adds 100%. If a unit that can do Help Wonder is disbanded with + * production recovery in a city and the production later is changed + * to something that can receive help from Help Wonder the remaining 50% + * of the shields are added. This can be done because the city remembers + * them in caravan_shields. * - * If a unit that can do Help Wonder intentionally is recycled rather - * than making it do Help Wonder its shields will still be + * If a unit that can do Help Wonder intentionally is disbanded with recovery + * rather than making it do Help Wonder its shields will still be * remembered. The target city that got 50% of the shields can * therefore get 100% of them by changing its production. This trick - * makes the ability to select Recycle Unit when Help Wonder is legal + * makes the ability to select Disband Unit Recover when Help Wonder is legal * pointless. */ - { ACTRES_RECYCLE_UNIT, ACTRES_HELP_WONDER }, + { ACTRES_DISBAND_UNIT_RECOVER, ACTRES_HELP_WONDER }, /* Allowing regular disband when ACTION_HELP_WONDER or - * ACTION_RECYCLE_UNIT is legal while ACTION_HELP_WONDER always - * blocks ACTION_RECYCLE_UNIT doesn't work well with the force_* + * ACTION_DISBAND_UNIT_RECOVER is legal while ACTION_HELP_WONDER always + * blocks ACTION_DISBAND_UNIT_RECOVER doesn't work well with the force_* * semantics. Should move to the ruleset once it has blocked_by * semantics. */ { ACTRES_DISBAND_UNIT, ACTRES_HELP_WONDER }, - { ACTRES_DISBAND_UNIT, ACTRES_RECYCLE_UNIT }, + { ACTRES_DISBAND_UNIT, ACTRES_DISBAND_UNIT_RECOVER }, /* Hard code that the ability to perform a regular attack blocks city * conquest. Is redundant as long as the requirement that the target diff --git a/server/ruleset.c b/server/ruleset.c index aeeabf05d7..2a4d39b43d 100644 --- a/server/ruleset.c +++ b/server/ruleset.c @@ -6206,12 +6206,18 @@ static int secfile_lookup_int_default_min_max(struct section_file *file, Load ui_name of one action **************************************************************************/ static bool load_action_ui_name(struct section_file *file, int act, - const char *entry_name) + const char *entry_name, + const char *compat_name) { const char *text; + const char *def = action_ui_name_default(act); - text = secfile_lookup_str_default(file, - action_ui_name_default(act), + if (compat_name != NULL) { + def = secfile_lookup_str_default(file, def, + "actions.%s", compat_name); + } + + text = secfile_lookup_str_default(file, def, "actions.%s", entry_name); sz_strlcpy(action_by_number(act)->ui_name, text); @@ -6221,7 +6227,8 @@ static bool load_action_ui_name(struct section_file *file, int act, /**********************************************************************//** Load max range of an action **************************************************************************/ -static bool load_action_range_max(struct section_file *file, action_id act) +static bool load_action_range_max(struct rscompat_info *compat, + struct section_file *file, action_id act) { struct entry *pentry; int max_range; @@ -6230,6 +6237,15 @@ static bool load_action_range_max(struct section_file *file, action_id act) pentry = secfile_entry_lookup(file, "actions.%s", action_max_range_ruleset_var_name(act)); + if (!pentry) { + const char *compat_name = rscompat_action_max_range_name_S3_1(compat, act); + + if (compat_name != NULL) { + pentry = secfile_entry_lookup(file, "actions.%s", + compat_name); + } + } + if (!pentry) { max_range = action_max_range_default(paction->result); } else { @@ -6257,13 +6273,14 @@ static bool load_action_range_max(struct section_file *file, action_id act) /**********************************************************************//** Load range of an action **************************************************************************/ -static bool load_action_range(struct section_file *file, action_id act) +static bool load_action_range(struct rscompat_info *compat, + struct section_file *file, action_id act) { struct action *paction = action_by_number(act); if (action_max_range_ruleset_var_name(act) != NULL) { /* Max range can be loaded from the ruleset. */ - if (!load_action_range_max(file, act)) { + if (!load_action_range_max(compat, file, act)) { return FALSE; } } @@ -7132,7 +7149,7 @@ static bool load_ruleset_game(struct section_file *file, bool act, /* Allow setting certain properties for some actions before * generalized actions. */ action_iterate(act_id) { - if (!load_action_range(file, act_id)) { + if (!load_action_range(compat, file, act_id)) { ok = FALSE; } if (!load_action_kind(file, act_id)) { @@ -7142,7 +7159,8 @@ static bool load_ruleset_game(struct section_file *file, bool act, ok = FALSE; } load_action_ui_name(file, act_id, - action_ui_name_ruleset_var_name(act_id)); + action_ui_name_ruleset_var_name(act_id), + rscompat_action_ui_name_S3_1(compat, act_id)); } action_iterate_end; /* The quiet (don't auto generate help for) property of all actions @@ -9147,6 +9165,8 @@ bool load_rulesets(const char *restore, const char *alt, bool compat_mode, set_ruleset_compat_mode(FALSE); + set_ruleset_compat_mode(FALSE); + /* We're in sane state as restoring previous ruleset succeeded, * but return failure to indicate that this is not what caller * wanted. */ @@ -9156,6 +9176,8 @@ bool load_rulesets(const char *restore, const char *alt, bool compat_mode, set_ruleset_compat_mode(FALSE); + set_ruleset_compat_mode(FALSE); + /* Fallback to default one, but not if that's what we tried already */ if (strcmp(GAME_DEFAULT_RULESETDIR, game.server.rulesetdir) && (restore == NULL || strcmp(GAME_DEFAULT_RULESETDIR, restore))) { diff --git a/server/savegame/savecompat.c b/server/savegame/savecompat.c index 36da794706..0a305832c3 100644 --- a/server/savegame/savecompat.c +++ b/server/savegame/savecompat.c @@ -1548,6 +1548,38 @@ static void compat_load_030100(struct loaddata *loading, } } player_slots_iterate_end; + { + int action_count; + + action_count = secfile_lookup_int_default(loading->file, 0, + "savefile.action_size"); + + if (action_count > 0) { + const char **modname; + const char **savemod; + int j; + const char *dur_name = "Disband Unit Recover"; + + modname = secfile_lookup_str_vec(loading->file, &loading->action.size, + "savefile.action_vector"); + + savemod = fc_calloc(action_count, sizeof(*savemod)); + + for (j = 0; j < action_count; j++) { + if (!strcasecmp("Recycle Unit", modname[j])) { + savemod[j] = dur_name; + } else { + savemod[j] = modname[j]; + } + } + + secfile_replace_str_vec(loading->file, savemod, action_count, + "savefile.action_vector"); + + free(savemod); + } + } + /* Server setting migration. */ { int set_count; @@ -2131,10 +2163,43 @@ static void compat_load_dev(struct loaddata *loading) insert_server_side_agent(loading, SAVEGAME_3); } /* Version < 3.0.93 */ - if (game_version < 3009400) { - /* Before version number bump to 3.0.94 */ + /* There was no relevant format changes between 3.0.93 and 3.0.94 */ + + if (game_version < 3009500) { + /* Before version number bump to 3.0.95 */ + + { + int action_count; - } /* Version < 3.0.94 */ + action_count = secfile_lookup_int_default(loading->file, 0, + "savefile.action_size"); + + if (action_count > 0) { + const char **modname; + const char **savemod; + int j; + const char *dur_name = "Disband Unit Recover"; + + modname = secfile_lookup_str_vec(loading->file, &loading->action.size, + "savefile.action_vector"); + + savemod = fc_calloc(action_count, sizeof(*savemod)); + + for (j = 0; j < action_count; j++) { + if (!strcasecmp("Recycle Unit", modname[j])) { + savemod[j] = dur_name; + } else { + savemod[j] = modname[j]; + } + } + + secfile_replace_str_vec(loading->file, savemod, action_count, + "savefile.action_vector"); + + free(savemod); + } + } + } /* Version < 3.0.95 */ #endif /* FREECIV_DEV_SAVE_COMPAT_3_1 */ } diff --git a/server/savegame/savegame2.c b/server/savegame/savegame2.c index 998c4b7c92..2b5a0314b6 100644 --- a/server/savegame/savegame2.c +++ b/server/savegame/savegame2.c @@ -3788,9 +3788,9 @@ static int sg_order_to_action(int order, struct unit *act_unit, * that anyone that intended to order Help Wonder used Help Wonder. */ /* Could in theory be intended as an order to disband in the field. Why * would the player give a unit an order to go to a non city location - * and disband there? Assume the intention was to recycle the unit - * until a non recycle disband order is found. */ - return ACTION_RECYCLE_UNIT; + * and disband there? Assume the intention was to recover production + * until a non recovering disband order is found. */ + return ACTION_DISBAND_UNIT_RECOVER; case ORDER_OLD_HOMECITY: return ACTION_HOME_CITY; } diff --git a/server/unithand.c b/server/unithand.c index 2315bf5278..2e06464927 100644 --- a/server/unithand.c +++ b/server/unithand.c @@ -928,7 +928,7 @@ static struct player *need_war_player_hlp(const struct unit *actor, case ACTRES_NUKE_UNITS: case ACTRES_DESTROY_CITY: case ACTRES_EXPEL_UNIT: - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: case ACTRES_DISBAND_UNIT: case ACTRES_HOME_CITY: case ACTRES_HOMELESS: @@ -2657,7 +2657,7 @@ void illegal_action_msg(struct player *pplayer, notify_player(pplayer, unit_tile(actor), event, ftc_server, - /* TRANS: Freight ... Recycle Unit ... Help Wonder ... */ + /* TRANS: Freight ... Disband Unit Recover ... Help Wonder ... */ _("Your %s can't do %s when %s is legal."), unit_name_translation(actor), stop_act_name, @@ -3533,7 +3533,7 @@ bool unit_perform_action(struct player *pplayer, actor_unit, pcity, paction)); break; - case ACTRES_RECYCLE_UNIT: + case ACTRES_DISBAND_UNIT_RECOVER: ACTION_PERFORM_UNIT_CITY(action_type, actor_unit, pcity, unit_do_help_build(pplayer, actor_unit, pcity, paction)); @@ -5265,7 +5265,7 @@ static bool unit_do_help_build(struct player *pplayer, &pcity_dest->production)); pcity_dest->caravan_shields += shields; } else { - fc_assert(action_has_result(paction, ACTRES_RECYCLE_UNIT)); + fc_assert(action_has_result(paction, ACTRES_DISBAND_UNIT_RECOVER)); /* Add the shields from recycling the unit to the city's current * production. */ pcity_dest->shield_stock += shields; @@ -5283,10 +5283,10 @@ static bool unit_do_help_build(struct player *pplayer, * the result of their donation. */ prod = city_production_name_translation(pcity_dest); } else { - fc_assert(action_has_result(paction, ACTRES_RECYCLE_UNIT)); - /* TRANS: Your Caravan does "Recycle Unit" to help build the + fc_assert(action_has_result(paction, ACTRES_DISBAND_UNIT_RECOVER)); + /* TRANS: Your Caravan does "Disband Unit Recover" to help build the * current production in Bergen (4 surplus). - * "Recycle Unit" says "current production" rather than its name. */ + * "Disband Unit Recover" says "current production" rather than its name. */ prod = _("current production"); } -- 2.35.1