From 7827c172746b77cc9245c035aaef2ab6cc3854e8 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 12 Mar 2022 10:54:53 +0200 Subject: [PATCH 45/45] Add slot for User Action 4 See osdn #44079 Signed-off-by: Marko Lindqvist --- common/actions.c | 21 ++++++++ common/actions.h | 122 +++++++++++++++++++++++---------------------- doc/README.actions | 4 +- fc_version | 2 +- 4 files changed, 86 insertions(+), 63 deletions(-) diff --git a/common/actions.c b/common/actions.c index 5ec4499d74..7204c13740 100644 --- a/common/actions.c +++ b/common/actions.c @@ -1487,6 +1487,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); } /**********************************************************************//** @@ -7750,6 +7756,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; } @@ -8063,6 +8071,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; @@ -8199,6 +8210,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; } @@ -8427,6 +8440,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; } @@ -8652,6 +8667,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; } @@ -9174,6 +9191,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; } @@ -9326,6 +9345,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: @@ -9470,6 +9490,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 0b524636ba..5cb17d75db 100644 --- a/common/actions.h +++ b/common/actions.h @@ -232,66 +232,68 @@ 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_VALUE105 ACTION_WIPE_UNITS -#define SPECENUM_VALUE105NAME "Wipe Units" -#define SPECENUM_VALUE106 ACTION_BOMBARD_LETHAL -#define SPECENUM_VALUE106NAME "Bombard Lethal" -#define SPECENUM_VALUE107 ACTION_SPY_ESCAPE -#define SPECENUM_VALUE107NAME "Spy Escape" -#define SPECENUM_VALUE108 ACTION_TRANSPORT_LOAD -#define SPECENUM_VALUE108NAME "Transport Load" -#define SPECENUM_VALUE109 ACTION_TRANSPORT_LOAD2 -#define SPECENUM_VALUE109NAME "Transport Load 2" -#define SPECENUM_VALUE110 ACTION_TRANSPORT_LOAD3 -#define SPECENUM_VALUE110NAME "Transport Load 3" -#define SPECENUM_VALUE111 ACTION_TRANSPORT_BOARD2 -#define SPECENUM_VALUE111NAME "Transport Board 2" -#define SPECENUM_VALUE112 ACTION_TRANSPORT_BOARD3 -#define SPECENUM_VALUE112NAME "Transport Board_3" -#define SPECENUM_VALUE113 ACTION_TRANSPORT_EMBARK4 -#define SPECENUM_VALUE113NAME "Transport Embark 4" +#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_VALUE105NAME "Unit Make Homeless" +#define SPECENUM_VALUE106 ACTION_WIPE_UNITS +#define SPECENUM_VALUE106NAME "Wipe Units" +#define SPECENUM_VALUE107 ACTION_BOMBARD_LETHAL +#define SPECENUM_VALUE107NAME "Bombard Lethal" +#define SPECENUM_VALUE108 ACTION_SPY_ESCAPE +#define SPECENUM_VALUE108NAME "Spy Escape" +#define SPECENUM_VALUE109 ACTION_TRANSPORT_LOAD +#define SPECENUM_VALUE109NAME "Transport Load" +#define SPECENUM_VALUE110 ACTION_TRANSPORT_LOAD2 +#define SPECENUM_VALUE110NAME "Transport Load 2" +#define SPECENUM_VALUE111 ACTION_TRANSPORT_LOAD3 +#define SPECENUM_VALUE111NAME "Transport Load 3" +#define SPECENUM_VALUE112 ACTION_TRANSPORT_BOARD2 +#define SPECENUM_VALUE112NAME "Transport Board 2" +#define SPECENUM_VALUE113 ACTION_TRANSPORT_BOARD3 +#define SPECENUM_VALUE113NAME "Transport Board_3" +#define SPECENUM_VALUE114 ACTION_TRANSPORT_EMBARK4 +#define SPECENUM_VALUE114NAME "Transport Embark 4" #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 d15f88ee36..84b7f68492 100644 --- a/doc/README.actions +++ b/doc/README.actions @@ -1483,5 +1483,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 de964e4fbd..a0ba9f99b3 100755 --- a/fc_version +++ b/fc_version @@ -56,7 +56,7 @@ DEFAULT_FOLLOW_TAG=S3_2 # - 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.2-2022.Mar.08" +NETWORK_CAPSTRING="+Freeciv.Devel-3.2-2022.Mar.12" FREECIV_DISTRIBUTOR="" -- 2.35.1