From 9f18e9c9802aec3ef3046a4f3fc1c8e631318a98 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 22 Apr 2022 23:19:31 +0300 Subject: [PATCH 44/44] Rename action target kind names Make names used in the rulesets more concise. Requested by kvilhaugsvik Name suggestions by nef, with minor change by me See osdn #41732 Signed-off-by: Marko Lindqvist --- common/actions.h | 12 ++++++------ data/alien/game.ruleset | 6 +++--- data/civ1/game.ruleset | 6 +++--- data/civ2/game.ruleset | 6 +++--- data/civ2civ3/game.ruleset | 6 +++--- data/classic/game.ruleset | 6 +++--- data/goldkeep/game.ruleset | 6 +++--- data/granularity/game.ruleset | 6 +++--- data/multiplayer/game.ruleset | 6 +++--- data/sandbox/game.ruleset | 6 +++--- data/stub/game.ruleset | 6 +++--- data/webperimental/game.ruleset | 6 +++--- doc/README.actions | 15 +++++++-------- 13 files changed, 46 insertions(+), 47 deletions(-) diff --git a/common/actions.h b/common/actions.h index c159959ea8..0269409145 100644 --- a/common/actions.h +++ b/common/actions.h @@ -32,18 +32,18 @@ extern "C" { /* When making changes to this, update also atk_helpnames at actions.c */ #define SPECENUM_NAME action_target_kind #define SPECENUM_VALUE0 ATK_CITY -#define SPECENUM_VALUE0NAME "individual cities" +#define SPECENUM_VALUE0NAME "City" #define SPECENUM_VALUE1 ATK_UNIT -#define SPECENUM_VALUE1NAME "individual units" +#define SPECENUM_VALUE1NAME "Unit" #define SPECENUM_VALUE2 ATK_UNITS -#define SPECENUM_VALUE2NAME "unit stacks" +#define SPECENUM_VALUE2NAME "Stack" #define SPECENUM_VALUE3 ATK_TILE -#define SPECENUM_VALUE3NAME "tiles" +#define SPECENUM_VALUE3NAME "Tile" #define SPECENUM_VALUE4 ATK_EXTRAS -#define SPECENUM_VALUE4NAME "tile extras" +#define SPECENUM_VALUE4NAME "Extras" /* No target except the actor itself. */ #define SPECENUM_VALUE5 ATK_SELF -#define SPECENUM_VALUE5NAME "itself" +#define SPECENUM_VALUE5NAME "Self" #define SPECENUM_COUNT ATK_COUNT #include "specenum_gen.h" diff --git a/data/alien/game.ruleset b/data/alien/game.ruleset index d734ed9b10..5a82e2455d 100644 --- a/data/alien/game.ruleset +++ b/data/alien/game.ruleset @@ -441,8 +441,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "individual cities" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "City" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -605,7 +605,7 @@ ui_name_unit_move = _("%sKeep moving%s") ; See the section "Ruleset defined actions" in doc/README.actions ; Example: set up "User Action 1" ;ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -;user_action_1_target_kind = "individual units" +;user_action_1_target_kind = "Unit" ;user_action_1_min_range = 1 ;user_action_1_max_range = 3 ;user_action_1_actor_consuming_always = FALSE diff --git a/data/civ1/game.ruleset b/data/civ1/game.ruleset index a83cd455b3..b292a48f1f 100644 --- a/data/civ1/game.ruleset +++ b/data/civ1/game.ruleset @@ -427,8 +427,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "individual cities" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "City" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -572,7 +572,7 @@ ui_name_unit_move = _("%sKeep moving%s") ; See the section "Ruleset defined actions" in doc/README.actions ; Example: set up "User Action 1" ;ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -;user_action_1_target_kind = "individual units" +;user_action_1_target_kind = "Unit" ;user_action_1_min_range = 1 ;user_action_1_max_range = 3 ;user_action_1_actor_consuming_always = FALSE diff --git a/data/civ2/game.ruleset b/data/civ2/game.ruleset index 97c58430c8..fef60e3c76 100644 --- a/data/civ2/game.ruleset +++ b/data/civ2/game.ruleset @@ -426,8 +426,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "individual cities" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "City" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -620,7 +620,7 @@ ui_name_unit_move = _("%sKeep moving%s") ; See the section "Ruleset defined actions" in doc/README.actions ; Example: set up "User Action 1" ;ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -;user_action_1_target_kind = "individual units" +;user_action_1_target_kind = "Unit" ;user_action_1_min_range = 1 ;user_action_1_max_range = 3 ;user_action_1_actor_consuming_always = FALSE diff --git a/data/civ2civ3/game.ruleset b/data/civ2civ3/game.ruleset index 404340d294..4f67b7c8bb 100644 --- a/data/civ2civ3/game.ruleset +++ b/data/civ2civ3/game.ruleset @@ -468,8 +468,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "individual cities" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "City" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -683,7 +683,7 @@ ui_name_unit_move = _("%sKeep moving%s") ; See the section "Ruleset defined actions" in doc/README.actions ; Example: set up "User Action 1" ;ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -;user_action_1_target_kind = "individual units" +;user_action_1_target_kind = "Unit" ;user_action_1_min_range = 1 ;user_action_1_max_range = 3 ;user_action_1_actor_consuming_always = FALSE diff --git a/data/classic/game.ruleset b/data/classic/game.ruleset index 29e773f4d3..d5c4ec788c 100644 --- a/data/classic/game.ruleset +++ b/data/classic/game.ruleset @@ -452,8 +452,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "individual cities" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "City" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -667,7 +667,7 @@ ui_name_unit_move = _("%sKeep moving%s") ; See the section "Ruleset defined actions" in doc/README.actions ; Example: set up "User Action 1" ;ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -;user_action_1_target_kind = "individual units" +;user_action_1_target_kind = "Unit" ;user_action_1_min_range = 1 ;user_action_1_max_range = 3 ;user_action_1_actor_consuming_always = FALSE diff --git a/data/goldkeep/game.ruleset b/data/goldkeep/game.ruleset index 25fc4e5814..031133cdd8 100644 --- a/data/goldkeep/game.ruleset +++ b/data/goldkeep/game.ruleset @@ -452,8 +452,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "individual cities" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "City" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -667,7 +667,7 @@ ui_name_unit_move = _("%sKeep moving%s") ; See the section "Ruleset defined actions" in doc/README.actions ; Example: set up "User Action 1" ;ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -;user_action_1_target_kind = "individual units" +;user_action_1_target_kind = "Unit" ;user_action_1_min_range = 1 ;user_action_1_max_range = 3 ;user_action_1_actor_consuming_always = FALSE diff --git a/data/granularity/game.ruleset b/data/granularity/game.ruleset index ccfb74294e..5839e8d083 100644 --- a/data/granularity/game.ruleset +++ b/data/granularity/game.ruleset @@ -392,8 +392,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "individual cities" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "City" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -467,7 +467,7 @@ ui_name_unit_move = _("%sKeep moving%s") ; See the section "Ruleset defined actions" in doc/README.actions ; Example: set up "User Action 1" ;ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -;user_action_1_target_kind = "individual units" +;user_action_1_target_kind = "Unit" ;user_action_1_min_range = 1 ;user_action_1_max_range = 3 ;user_action_1_actor_consuming_always = FALSE diff --git a/data/multiplayer/game.ruleset b/data/multiplayer/game.ruleset index 2a06c1adc0..fc1ea13705 100644 --- a/data/multiplayer/game.ruleset +++ b/data/multiplayer/game.ruleset @@ -452,8 +452,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "individual cities" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "City" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -661,7 +661,7 @@ ui_name_unit_move = _("%sKeep moving%s") ; See the section "Ruleset defined actions" in doc/README.actions ; Example: set up "User Action 1" ;ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -;user_action_1_target_kind = "individual units" +;user_action_1_target_kind = "Unit" ;user_action_1_min_range = 1 ;user_action_1_max_range = 3 ;user_action_1_actor_consuming_always = FALSE diff --git a/data/sandbox/game.ruleset b/data/sandbox/game.ruleset index 06f2e3bde5..ba9e439e13 100644 --- a/data/sandbox/game.ruleset +++ b/data/sandbox/game.ruleset @@ -479,8 +479,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "tiles" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "Tile" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -735,7 +735,7 @@ ui_name_transport_embark_4 = _("%sSwitch Transporter%s") ; /* TRANS: _Disrupt Supply Lines (100% chance of success). */ ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -user_action_1_target_kind = "individual units" +user_action_1_target_kind = "Unit" user_action_1_min_range = 1 user_action_1_max_range = 3 user_action_1_actor_consuming_always = FALSE diff --git a/data/stub/game.ruleset b/data/stub/game.ruleset index 6f3263c6e2..590e9c7b25 100644 --- a/data/stub/game.ruleset +++ b/data/stub/game.ruleset @@ -383,8 +383,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "individual cities" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "City" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -444,7 +444,7 @@ found_city_consuming_always = TRUE ; See the section "Ruleset defined actions" in doc/README.actions ; Example: set up "User Action 1" ;ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -;user_action_1_target_kind = "individual units" +;user_action_1_target_kind = "Unit" ;user_action_1_min_range = 1 ;user_action_1_max_range = 3 ;user_action_1_actor_consuming_always = FALSE diff --git a/data/webperimental/game.ruleset b/data/webperimental/game.ruleset index ce473fa5fa..0980cc0b01 100644 --- a/data/webperimental/game.ruleset +++ b/data/webperimental/game.ruleset @@ -425,8 +425,8 @@ nuke_city_consuming_always = TRUE; ; The kind of target the "Nuke City" action has. The target requirements of ; its enablers are evaluated against the target. The target owner is the one ; that gets a Casus Belli if the ruleset has a Casus Belli for this action. -; Supported values are "individual cities" and "tiles". -nuke_city_target_kind = "individual cities" +; Supported values are "City" and "Tile". +nuke_city_target_kind = "City" ; The minimal distance from the actor unit to the target. The value 0 means ; that the target must be at the tile of the actor unit. The value 1 means @@ -641,7 +641,7 @@ ui_name_unit_move = _("%sKeep moving%s") ; /* TRANS: _Disrupt Supply Lines (100% chance of success). */ ui_name_user_action_1 = _("%sDisrupt Supply Lines%s") -user_action_1_target_kind = "individual units" +user_action_1_target_kind = "Unit" user_action_1_min_range = 1 user_action_1_max_range = 3 user_action_1_actor_consuming_always = FALSE diff --git a/doc/README.actions b/doc/README.actions index bed9b5a82b..65d0a88f36 100644 --- a/doc/README.actions +++ b/doc/README.actions @@ -152,25 +152,25 @@ end -- Describe the target based on its kind target_describer = { - ["individual cities"] = function (target) + ["City"] = function (target) return _("%s city %s (id: %d)"):format( target.owner.nation:name_translation(), target.name, target.id) end, - ["individual units"] = function (target) + ["Unit"] = function (target) return _("%s %s (id: %d)"):format( target.owner.nation:name_translation(), target.utype:name_translation(), target.id) end, - ["unit stacks"] = function (target) + ["Stack"] = function (target) return _("unit stack at (%d, %d)"):format(target.x, target.y) end, - ["tiles"] = tile_desc_func_gen("tile", function (target) + ["Tile"] = tile_desc_func_gen("tile", function (target) return target.owner end), - ["tile extras"] = tile_desc_func_gen("tile extras", function (target) + ["Extras"] = tile_desc_func_gen("tile extras", function (target) return target:extra_owner(Nil) end), - ["itself"] = function (target) return "it self" end, + ["Self"] = function (target) return "it self" end, } -- Log all performed actions @@ -1475,8 +1475,7 @@ ruleset variables allows user action number n to be further customized: The UI name shown to the user in the action selection dialog. * user_action_n_target_kind The kind of target the action is done to. See target_reqs. - Legal values: "individual cities", "individual units", "unit stacks", - "tiles" or "itself" + Legal values: "City", "Unit", "Stack", "Tile" or "Self" * user_action_n_min_range and user_action_n_max_range What distance from the actor to the target is permitted for the action. * user_action_n_actor_consuming_always -- 2.35.1