From 53c89718077f3dc24d9ca1960da2b31f2ff813cf Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 12 Mar 2022 11:03:44 +0200 Subject: [PATCH 34/34] Add slot for User Action 4 See osdn #44079 Signed-off-by: Marko Lindqvist --- common/actions.c | 21 +++++++++++ common/actions.h | 86 ++++++++++++++++++++++++---------------------- doc/README.actions | 4 +-- fc_version | 2 +- 4 files changed, 68 insertions(+), 45 deletions(-) diff --git a/common/actions.c b/common/actions.c index af7b2ed982..685ce6c59e 100644 --- a/common/actions.c +++ b/common/actions.c @@ -1437,6 +1437,12 @@ static void hard_code_actions(void) MAK_UNREPRESENTABLE, /* Overwritten by the ruleset */ 0, 1, FALSE); + actions[ACTION_USER_ACTION4] = + unit_action_new(ACTION_USER_ACTION4, ACTRES_NONE, + FALSE, TRUE, + MAK_UNREPRESENTABLE, + /* Overwritten by the ruleset */ + 0, 1, FALSE); } /**********************************************************************//** @@ -7579,6 +7585,8 @@ const char *action_ui_name_ruleset_var_name(int act) 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_COUNT: break; } @@ -7875,6 +7883,9 @@ const char *action_ui_name_default(int act) case ACTION_USER_ACTION3: /* TRANS: _User Action 3 (100% chance of success). */ return N_("%sUser Action 3%s"); + case ACTION_USER_ACTION4: + /* TRANS: _User Action 4 (100% chance of success). */ + return N_("%sUser Action 4%s"); } return NULL; @@ -8002,6 +8013,8 @@ const char *action_min_range_ruleset_var_name(int act) return "user_action_2_min_range"; case ACTION_USER_ACTION3: return "user_action_3_min_range"; + case ACTION_USER_ACTION4: + return "user_action_4_min_range"; case ACTION_COUNT: break; } @@ -8217,6 +8230,8 @@ const char *action_max_range_ruleset_var_name(int act) return "user_action_2_max_range"; case ACTION_USER_ACTION3: return "user_action_3_max_range"; + case ACTION_USER_ACTION4: + return "user_action_4_max_range"; case ACTION_COUNT: break; } @@ -8430,6 +8445,8 @@ const char *action_target_kind_ruleset_var_name(int act) return "user_action_2_target_kind"; case ACTION_USER_ACTION3: return "user_action_3_target_kind"; + case ACTION_USER_ACTION4: + return "user_action_4_target_kind"; case ACTION_COUNT: break; } @@ -8931,6 +8948,8 @@ const char *action_actor_consuming_always_ruleset_var_name(action_id act) return "user_action_2_actor_consuming_always"; case ACTION_USER_ACTION3: return "user_action_3_actor_consuming_always"; + case ACTION_USER_ACTION4: + return "user_action_4_actor_consuming_always"; case ACTION_COUNT: break; } @@ -9072,6 +9091,7 @@ const char *action_blocked_by_ruleset_var_name(const struct action *act) case ACTION_USER_ACTION1: case ACTION_USER_ACTION2: case ACTION_USER_ACTION3: + case ACTION_USER_ACTION4: /* blocked_by is not ruleset changeable */ return NULL; case ACTION_COUNT: @@ -9205,6 +9225,7 @@ action_post_success_forced_ruleset_var_name(const struct action *act) case ACTION_USER_ACTION1: case ACTION_USER_ACTION2: case ACTION_USER_ACTION3: + case ACTION_USER_ACTION4: /* not ruleset changeable */ return NULL; case ACTION_COUNT: diff --git a/common/actions.h b/common/actions.h index c3dc43a15e..4e27f60e76 100644 --- a/common/actions.h +++ b/common/actions.h @@ -232,48 +232,50 @@ extern "C" { #define SPECENUM_VALUE82NAME "User Action 2" #define SPECENUM_VALUE83 ACTION_USER_ACTION3 #define SPECENUM_VALUE83NAME "User Action 3" -#define SPECENUM_VALUE84 ACTION_HEAL_UNIT2 -#define SPECENUM_VALUE84NAME "Heal Unit 2" -#define SPECENUM_VALUE85 ACTION_CONQUER_CITY3 -#define SPECENUM_VALUE85NAME "Conquer City 3" -#define SPECENUM_VALUE86 ACTION_CONQUER_CITY4 -#define SPECENUM_VALUE86NAME "Conquer City 4" -#define SPECENUM_VALUE87 ACTION_CONQUER_EXTRAS3 -#define SPECENUM_VALUE87NAME "Conquer Extras 3" -#define SPECENUM_VALUE88 ACTION_CONQUER_EXTRAS4 -#define SPECENUM_VALUE88NAME "Conquer Extras 4" -#define SPECENUM_VALUE89 ACTION_TRANSPORT_DISEMBARK3 -#define SPECENUM_VALUE89NAME "Transport Disembark 3" -#define SPECENUM_VALUE90 ACTION_TRANSPORT_DISEMBARK4 -#define SPECENUM_VALUE90NAME "Transport Disembark 4" -#define SPECENUM_VALUE91 ACTION_TRANSPORT_EMBARK2 -#define SPECENUM_VALUE91NAME "Transport Embark 2" -#define SPECENUM_VALUE92 ACTION_TRANSPORT_EMBARK3 -#define SPECENUM_VALUE92NAME "Transport Embark 3" -#define SPECENUM_VALUE93 ACTION_HUT_ENTER3 -#define SPECENUM_VALUE93NAME "Enter Hut 3" -#define SPECENUM_VALUE94 ACTION_HUT_ENTER4 -#define SPECENUM_VALUE94NAME "Enter Hut 4" -#define SPECENUM_VALUE95 ACTION_HUT_FRIGHTEN3 -#define SPECENUM_VALUE95NAME "Frighten Hut 3" -#define SPECENUM_VALUE96 ACTION_HUT_FRIGHTEN4 -#define SPECENUM_VALUE96NAME "Frighten Hut 4" -#define SPECENUM_VALUE97 ACTION_UNIT_MOVE2 -#define SPECENUM_VALUE97NAME "Unit Move 2" -#define SPECENUM_VALUE98 ACTION_UNIT_MOVE3 -#define SPECENUM_VALUE98NAME "Unit Move 3" -#define SPECENUM_VALUE99 ACTION_PARADROP_CONQUER -#define SPECENUM_VALUE99NAME "Paradrop Unit Conquer" -#define SPECENUM_VALUE100 ACTION_PARADROP_FRIGHTEN -#define SPECENUM_VALUE100NAME "Paradrop Unit Frighten" -#define SPECENUM_VALUE101 ACTION_PARADROP_FRIGHTEN_CONQUER -#define SPECENUM_VALUE101NAME "Paradrop Unit Frighten Conquer" -#define SPECENUM_VALUE102 ACTION_PARADROP_ENTER -#define SPECENUM_VALUE102NAME "Paradrop Unit Enter" -#define SPECENUM_VALUE103 ACTION_PARADROP_ENTER_CONQUER -#define SPECENUM_VALUE103NAME "Paradrop Unit Enter Conquer" -#define SPECENUM_VALUE104 ACTION_HOMELESS -#define SPECENUM_VALUE104NAME "Unit Make Homeless" +#define SPECENUM_VALUE84 ACTION_USER_ACTION4 +#define SPECENUM_VALUE84NAME "User Action 4" +#define SPECENUM_VALUE85 ACTION_HEAL_UNIT2 +#define SPECENUM_VALUE85NAME "Heal Unit 2" +#define SPECENUM_VALUE86 ACTION_CONQUER_CITY3 +#define SPECENUM_VALUE86NAME "Conquer City 3" +#define SPECENUM_VALUE87 ACTION_CONQUER_CITY4 +#define SPECENUM_VALUE87NAME "Conquer City 4" +#define SPECENUM_VALUE88 ACTION_CONQUER_EXTRAS3 +#define SPECENUM_VALUE88NAME "Conquer Extras 3" +#define SPECENUM_VALUE89 ACTION_CONQUER_EXTRAS4 +#define SPECENUM_VALUE89NAME "Conquer Extras 4" +#define SPECENUM_VALUE90 ACTION_TRANSPORT_DISEMBARK3 +#define SPECENUM_VALUE90NAME "Transport Disembark 3" +#define SPECENUM_VALUE91 ACTION_TRANSPORT_DISEMBARK4 +#define SPECENUM_VALUE91NAME "Transport Disembark 4" +#define SPECENUM_VALUE92 ACTION_TRANSPORT_EMBARK2 +#define SPECENUM_VALUE92NAME "Transport Embark 2" +#define SPECENUM_VALUE93 ACTION_TRANSPORT_EMBARK3 +#define SPECENUM_VALUE93NAME "Transport Embark 3" +#define SPECENUM_VALUE94 ACTION_HUT_ENTER3 +#define SPECENUM_VALUE94NAME "Enter Hut 3" +#define SPECENUM_VALUE95 ACTION_HUT_ENTER4 +#define SPECENUM_VALUE95NAME "Enter Hut 4" +#define SPECENUM_VALUE96 ACTION_HUT_FRIGHTEN3 +#define SPECENUM_VALUE96NAME "Frighten Hut 3" +#define SPECENUM_VALUE97 ACTION_HUT_FRIGHTEN4 +#define SPECENUM_VALUE97NAME "Frighten Hut 4" +#define SPECENUM_VALUE98 ACTION_UNIT_MOVE2 +#define SPECENUM_VALUE98NAME "Unit Move 2" +#define SPECENUM_VALUE99 ACTION_UNIT_MOVE3 +#define SPECENUM_VALUE99NAME "Unit Move 3" +#define SPECENUM_VALUE100 ACTION_PARADROP_CONQUER +#define SPECENUM_VALUE100NAME "Paradrop Unit Conquer" +#define SPECENUM_VALUE101 ACTION_PARADROP_FRIGHTEN +#define SPECENUM_VALUE101NAME "Paradrop Unit Frighten" +#define SPECENUM_VALUE102 ACTION_PARADROP_FRIGHTEN_CONQUER +#define SPECENUM_VALUE102NAME "Paradrop Unit Frighten Conquer" +#define SPECENUM_VALUE103 ACTION_PARADROP_ENTER +#define SPECENUM_VALUE103NAME "Paradrop Unit Enter" +#define SPECENUM_VALUE104 ACTION_PARADROP_ENTER_CONQUER +#define SPECENUM_VALUE104NAME "Paradrop Unit Enter Conquer" +#define SPECENUM_VALUE105 ACTION_HOMELESS +#define SPECENUM_VALUE106NAME "Unit Make Homeless" #define SPECENUM_BITVECTOR bv_actions #define SPECENUM_COUNT ACTION_COUNT #include "specenum_gen.h" diff --git a/doc/README.actions b/doc/README.actions index d87e38b491..385df39eab 100644 --- a/doc/README.actions +++ b/doc/README.actions @@ -1387,5 +1387,5 @@ ruleset variables allows user action number n to be further customized: TRUE if Freeciv should make sure that the actor is spent after the action is successfully done. -The current ruleset defined actions are "User Action 1", "User Action 2" and -"User Action 3". +The current ruleset defined actions are "User Action 1", "User Action 2", +"User Action 3", and "User Action 4". diff --git a/fc_version b/fc_version index bc08cd8696..8904e4b250 100755 --- a/fc_version +++ b/fc_version @@ -56,7 +56,7 @@ DEFAULT_FOLLOW_TAG=S3_1 # - No new mandatory capabilities can be added to the release branch; doing # so would break network capability of supposedly "compatible" releases. # -NETWORK_CAPSTRING="+Freeciv.Devel-3.1-2022.Feb.19" +NETWORK_CAPSTRING="+Freeciv.Devel-3.1-2022.Mar.12" FREECIV_DISTRIBUTOR="" -- 2.35.1