From ae10ebb368f3122b4c383a15ac7116cf805d6409 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 21 Jan 2023 08:02:28 +0200 Subject: [PATCH 35/35] Replace action_target_compl_calc() switch with an array lookup - Create new actres.[ch] module - Add struct actres - Make array of them to hold information about every actres - Make act_tgt_compl the first field of the strcuct actres - Reimplement action_target_compl_calc() as actres_target_compl_calc() that does indexed lookup from the actres array See osdn #46563 Signed-off-by: Marko Lindqvist --- common/Makefile.am | 2 + common/actions.c | 103 +----------------------------- common/actions.h | 56 +---------------- common/actres.c | 115 ++++++++++++++++++++++++++++++++++ common/actres.h | 94 +++++++++++++++++++++++++++ common/fc_types.h | 5 +- common/game.c | 3 + meson.build | 1 + translations/core/POTFILES.in | 2 + 9 files changed, 223 insertions(+), 158 deletions(-) create mode 100644 common/actres.c create mode 100644 common/actres.h diff --git a/common/Makefile.am b/common/Makefile.am index c8c83ce86a..88f3ffe47e 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -17,6 +17,8 @@ libfreeciv_la_SOURCES = \ achievements.h \ actions.c \ actions.h \ + actres.c \ + actres.h \ ai.c \ ai.h \ base.c \ diff --git a/common/actions.c b/common/actions.c index 8d59aa823e..65f3f50d8d 100644 --- a/common/actions.c +++ b/common/actions.c @@ -120,10 +120,6 @@ unit_action_new(action_id id, static enum action_sub_target_kind action_sub_target_kind_default(enum action_result result); -static enum act_tgt_compl -action_target_compl_calc(enum action_result result, - enum action_target_kind tgt_kind, - enum action_sub_target_kind sub_tgt_kind); static bool is_enabler_active(const struct action_enabler *enabler, const struct req_context *actor, @@ -1644,9 +1640,7 @@ static struct action *action_new(action_id id, action->actor_kind = AAK_UNIT; action->target_kind = action_target_kind_default(result); action->sub_target_kind = action_sub_target_kind_default(result); - action->target_complexity - = action_target_compl_calc(result, action->target_kind, - action->sub_target_kind); + action->target_complexity = actres_target_compl_calc(result); /* ASTK_NONE implies ACT_TGT_COMPL_SIMPLE and * !ASTK_NONE implies !ACT_TGT_COMPL_SIMPLE */ @@ -8990,101 +8984,6 @@ action_sub_target_kind_default(enum action_result result) return ASTK_NONE; } -/**********************************************************************//** - Returns the sub target complexity for the action with the specified - result when it has the specified target kind and sub target kind. -**************************************************************************/ -static enum act_tgt_compl -action_target_compl_calc(enum action_result result, - enum action_target_kind tgt_kind, - enum action_sub_target_kind sub_tgt_kind) -{ - fc_assert_ret_val(action_result_is_valid(result) || result == ACTRES_NONE, - ACT_TGT_COMPL_SIMPLE); - - switch (result) { - case ACTRES_ESTABLISH_EMBASSY: - case ACTRES_SPY_INVESTIGATE_CITY: - case ACTRES_SPY_POISON: - case ACTRES_SPY_STEAL_GOLD: - case ACTRES_SPY_SABOTAGE_CITY: - case ACTRES_SPY_SABOTAGE_CITY_PRODUCTION: - case ACTRES_SPY_STEAL_TECH: - case ACTRES_SPY_INCITE_CITY: - case ACTRES_TRADE_ROUTE: - case ACTRES_MARKETPLACE: - case ACTRES_HELP_WONDER: - case ACTRES_JOIN_CITY: - case ACTRES_STEAL_MAPS: - case ACTRES_SPY_NUKE: - case ACTRES_DESTROY_CITY: - case ACTRES_DISBAND_UNIT_RECOVER: - case ACTRES_HOME_CITY: - case ACTRES_HOMELESS: - case ACTRES_UPGRADE_UNIT: - case ACTRES_AIRLIFT: - case ACTRES_STRIKE_PRODUCTION: - case ACTRES_CONQUER_CITY: - case ACTRES_SPY_SPREAD_PLAGUE: - return ACT_TGT_COMPL_SIMPLE; - case ACTRES_SPY_TARGETED_SABOTAGE_CITY: - case ACTRES_STRIKE_BUILDING: - case ACTRES_SPY_TARGETED_STEAL_TECH: - return ACT_TGT_COMPL_MANDATORY; - case ACTRES_SPY_BRIBE_UNIT: - case ACTRES_SPY_SABOTAGE_UNIT: - case ACTRES_EXPEL_UNIT: - case ACTRES_HEAL_UNIT: - case ACTRES_TRANSPORT_ALIGHT: - case ACTRES_TRANSPORT_UNLOAD: - case ACTRES_TRANSPORT_LOAD: - case ACTRES_TRANSPORT_BOARD: - case ACTRES_TRANSPORT_EMBARK: - return ACT_TGT_COMPL_SIMPLE; - case ACTRES_CAPTURE_UNITS: - case ACTRES_BOMBARD: - case ACTRES_NUKE_UNITS: - case ACTRES_ATTACK: - case ACTRES_WIPE_UNITS: - case ACTRES_SPY_ATTACK: - return ACT_TGT_COMPL_SIMPLE; - case ACTRES_FOUND_CITY: - case ACTRES_NUKE: - case ACTRES_PARADROP: - case ACTRES_PARADROP_CONQUER: - case ACTRES_TRANSFORM_TERRAIN: - case ACTRES_CULTIVATE: - case ACTRES_PLANT: - case ACTRES_TRANSPORT_DISEMBARK: - case ACTRES_HUT_ENTER: - case ACTRES_HUT_FRIGHTEN: - case ACTRES_UNIT_MOVE: - case ACTRES_SPY_ESCAPE: - return ACT_TGT_COMPL_SIMPLE; - case ACTRES_PILLAGE: - case ACTRES_CLEAN: - case ACTRES_CLEAN_POLLUTION: - case ACTRES_CLEAN_FALLOUT: - return ACT_TGT_COMPL_FLEXIBLE; - case ACTRES_ROAD: - case ACTRES_BASE: - case ACTRES_MINE: - case ACTRES_IRRIGATE: - return ACT_TGT_COMPL_MANDATORY; - case ACTRES_CONQUER_EXTRAS: - return ACT_TGT_COMPL_SIMPLE; - case ACTRES_DISBAND_UNIT: - case ACTRES_CONVERT: - case ACTRES_FORTIFY: - return ACT_TGT_COMPL_SIMPLE; - case ACTRES_NONE: - return ACT_TGT_COMPL_SIMPLE; - } - - /* Should never be reached. */ - return ACT_TGT_COMPL_SIMPLE; -} - /**********************************************************************//** Return actor consuming always ruleset variable name for the action or NULL if actor consuming always can't be set in the ruleset. diff --git a/common/actions.h b/common/actions.h index 8d781f69d0..1d64437db1 100644 --- a/common/actions.h +++ b/common/actions.h @@ -15,6 +15,7 @@ #define FC_ACTIONS_H /* common */ +#include "actres.h" #include "fc_types.h" #include "requirements.h" @@ -28,39 +29,6 @@ extern "C" { #define SPECENUM_COUNT AAK_COUNT #include "specenum_gen.h" -/* 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 "City" -#define SPECENUM_VALUE1 ATK_UNIT -#define SPECENUM_VALUE1NAME "Unit" -#define SPECENUM_VALUE2 ATK_UNITS -#define SPECENUM_VALUE2NAME "Stack" -#define SPECENUM_VALUE3 ATK_TILE -#define SPECENUM_VALUE3NAME "Tile" -#define SPECENUM_VALUE4 ATK_EXTRAS -#define SPECENUM_VALUE4NAME "Extras" -/* No target except the actor itself. */ -#define SPECENUM_VALUE5 ATK_SELF -#define SPECENUM_VALUE5NAME "Self" -#define SPECENUM_COUNT ATK_COUNT -#include "specenum_gen.h" - -/* Values used in the network protocol. */ -#define SPECENUM_NAME action_sub_target_kind -#define SPECENUM_VALUE0 ASTK_NONE -#define SPECENUM_VALUE0NAME N_("nothing") -#define SPECENUM_VALUE1 ASTK_BUILDING -#define SPECENUM_VALUE1NAME N_("buildings in") -#define SPECENUM_VALUE2 ASTK_TECH -#define SPECENUM_VALUE2NAME N_("techs from") -#define SPECENUM_VALUE3 ASTK_EXTRA -#define SPECENUM_VALUE3NAME N_("extras on") -#define SPECENUM_VALUE4 ASTK_EXTRA_NOT_THERE -#define SPECENUM_VALUE4NAME N_("create extras on") -#define SPECENUM_COUNT ASTK_COUNT -#include "specenum_gen.h" - /* Values used in the network protocol. */ /* Names used in file formats but not normally shown to users. */ #define SPECENUM_NAME gen_action @@ -368,28 +336,6 @@ extern "C" { /* No action max distance can be bigger than this. */ #define ACTION_DISTANCE_MAX ACTION_DISTANCE_UNLIMITED -/* Action target complexity */ -#define SPECENUM_NAME act_tgt_compl -/* The action's target is just the primary target. (Just the tile, unit, - * city, etc). */ -#define SPECENUM_VALUE0 ACT_TGT_COMPL_SIMPLE -#define SPECENUM_VALUE0NAME N_("simple") -/* The action's target is complex because its target is the primary target - * and a sub target. (Examples: Tile + Extra and City + Building.) The - * player is able to specify details about this action but the server will - * fill in missing details so a client can choose to not specify the sub - * target. */ -#define SPECENUM_VALUE1 ACT_TGT_COMPL_FLEXIBLE -#define SPECENUM_VALUE1NAME N_("flexible") -/* The action's target is complex because its target is the primary target - * and a sub target. (Examples: Tile + Extra and City + Building.) The - * player is required to specify details about this action because the - * server won't fill inn the missing details when unspecified. A client must - * therefore specify the sub target of this action. */ -#define SPECENUM_VALUE2 ACT_TGT_COMPL_MANDATORY -#define SPECENUM_VALUE2NAME N_("mandatory") -#include "specenum_gen.h" - struct action { action_id id; diff --git a/common/actres.c b/common/actres.c new file mode 100644 index 0000000000..a23eb8561d --- /dev/null +++ b/common/actres.c @@ -0,0 +1,115 @@ +/**************************************************************************** + Freeciv - Copyright (C) 2023 - The Freeciv Team + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +****************************************************************************/ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "actres.h" + +static struct actres act_results[ACTRES_LAST] = { + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_ESTABLISH_EMBASSY */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_INVESTIGATE_CITY */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_POISON */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_STEAL_GOLD */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_SABOTAGE_CITY */ + { ACT_TGT_COMPL_MANDATORY }, /* ACTRES_SPY_TARGETED_SABOTAGE_CITY */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_SABOTAGE_CITY_PRODUCTION */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_STEAL_TECH */ + { ACT_TGT_COMPL_MANDATORY }, /* ACTRES_SPY_TARGETED_STEAL_TECH */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_INCITE_CITY */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_TRADE_ROUTE */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_MARKETPLACE */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_HELP_WONDER */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_BRIBE_UNIT */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_SABOTAGE_UNIT */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_CAPTURE_UNITS */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_FOUND_CITY */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_JOIN_CITY */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_STEAL_MAPS */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_BOMBARD */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_NUKE */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_NUKE */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_NUKE_UNITS */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_DESTROY_CITY */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_EXPEL_UNIT */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_DISBAND_UNIT_RECOVER */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_DISBAND_UNIT */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_HOME_CITY */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_UPGRADE_UNIT */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_PARADROP */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_AIRLIFT */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_ATTACK */ + { ACT_TGT_COMPL_MANDATORY }, /* ACTRES_STRIKE_BUILDING */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_STRIKE_PRODUCTION */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_CONQUER_CITY */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_HEAL_UNIT */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_TRANSFORM_TERRAIN */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_CULTIVATE */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_PLANT */ + { ACT_TGT_COMPL_FLEXIBLE }, /* ACTRES_PILLAGE */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_FORTIFY */ + { ACT_TGT_COMPL_MANDATORY }, /* ACTRES_ROAD */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_CONVERT */ + { ACT_TGT_COMPL_MANDATORY }, /* ACTRES_BASE */ + { ACT_TGT_COMPL_MANDATORY }, /* ACTRES_MINE */ + { ACT_TGT_COMPL_MANDATORY }, /* ACTRES_IRRIGATE */ + { ACT_TGT_COMPL_FLEXIBLE }, /* ACTRES_CLEAN_POLLUTION */ + { ACT_TGT_COMPL_FLEXIBLE }, /* ACTRES_CLEAN_FALLOUT */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_TRANSPORT_ALIGHT */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_TRANSPORT_UNLOAD */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_TRANSPORT_DISEMBARK */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_TRANSPORT_BOARD */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_TRANSPORT_EMBARK */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_SPREAD_PLAGUE */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_ATTACK */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_CONQUER_EXTRAS */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_HUT_ENTER */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_HUT_FRIGHTEN */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_UNIT_MOVE */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_PARADROP_CONQUER */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_HOMELESS */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_WIPE_UNITS */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_SPY_ESCAPE */ + { ACT_TGT_COMPL_SIMPLE }, /* ACTRES_TRANSPORT_LOAD */ + { ACT_TGT_COMPL_FLEXIBLE } /* ACTRES_CLEAN */ +}; + +/*********************************************************************//** + Initialize action results system +*************************************************************************/ +void actres_init(void) +{ +} + +/*********************************************************************//** + Free resources allocated by the action results system +*************************************************************************/ +void actres_free(void) +{ +} + +/**********************************************************************//** + Returns the sub target complexity for the action with the specified + result when it has the specified target kind and sub target kind. +**************************************************************************/ +enum act_tgt_compl actres_target_compl_calc(enum action_result result) +{ + if (result == ACTRES_NONE) { + return ACT_TGT_COMPL_SIMPLE; + } + + fc_assert_ret_val(action_result_is_valid(result), ACT_TGT_COMPL_SIMPLE); + + return act_results[result].sub_tgt_compl; +} diff --git a/common/actres.h b/common/actres.h new file mode 100644 index 0000000000..d3d42ae3f2 --- /dev/null +++ b/common/actres.h @@ -0,0 +1,94 @@ +/*********************************************************************** + Freeciv - Copyright (C) 2023 - A Kjeldberg, L Gregersen, P Unold + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. +***********************************************************************/ +#ifndef FC__ACTRES_H +#define FC__ACTRES_H + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* common */ +#include "fc_types.h" + + +/* 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 "City" +#define SPECENUM_VALUE1 ATK_UNIT +#define SPECENUM_VALUE1NAME "Unit" +#define SPECENUM_VALUE2 ATK_UNITS +#define SPECENUM_VALUE2NAME "Stack" +#define SPECENUM_VALUE3 ATK_TILE +#define SPECENUM_VALUE3NAME "Tile" +#define SPECENUM_VALUE4 ATK_EXTRAS +#define SPECENUM_VALUE4NAME "Extras" +/* No target except the actor itself. */ +#define SPECENUM_VALUE5 ATK_SELF +#define SPECENUM_VALUE5NAME "Self" +#define SPECENUM_COUNT ATK_COUNT +#include "specenum_gen.h" + +/* Values used in the network protocol. */ +#define SPECENUM_NAME action_sub_target_kind +#define SPECENUM_VALUE0 ASTK_NONE +#define SPECENUM_VALUE0NAME N_("nothing") +#define SPECENUM_VALUE1 ASTK_BUILDING +#define SPECENUM_VALUE1NAME N_("buildings in") +#define SPECENUM_VALUE2 ASTK_TECH +#define SPECENUM_VALUE2NAME N_("techs from") +#define SPECENUM_VALUE3 ASTK_EXTRA +#define SPECENUM_VALUE3NAME N_("extras on") +#define SPECENUM_VALUE4 ASTK_EXTRA_NOT_THERE +#define SPECENUM_VALUE4NAME N_("create extras on") +#define SPECENUM_COUNT ASTK_COUNT +#include "specenum_gen.h" + +/* Action target complexity */ +#define SPECENUM_NAME act_tgt_compl +/* The action's target is just the primary target. (Just the tile, unit, + * city, etc). */ +#define SPECENUM_VALUE0 ACT_TGT_COMPL_SIMPLE +#define SPECENUM_VALUE0NAME N_("simple") +/* The action's target is complex because its target is the primary target + * and a sub target. (Examples: Tile + Extra and City + Building.) The + * player is able to specify details about this action but the server will + * fill in missing details so a client can choose to not specify the sub + * target. */ +#define SPECENUM_VALUE1 ACT_TGT_COMPL_FLEXIBLE +#define SPECENUM_VALUE1NAME N_("flexible") +/* The action's target is complex because its target is the primary target + * and a sub target. (Examples: Tile + Extra and City + Building.) The + * player is required to specify details about this action because the + * server won't fill inn the missing details when unspecified. A client must + * therefore specify the sub target of this action. */ +#define SPECENUM_VALUE2 ACT_TGT_COMPL_MANDATORY +#define SPECENUM_VALUE2NAME N_("mandatory") +#include "specenum_gen.h" + + + +struct actres { + enum act_tgt_compl sub_tgt_compl; +}; + +void actres_init(void); +void actres_free(void); + +enum act_tgt_compl actres_target_compl_calc(enum action_result result); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* FC__ACTRES_H */ diff --git a/common/fc_types.h b/common/fc_types.h index 8f8a6043f5..1331a80d6e 100644 --- a/common/fc_types.h +++ b/common/fc_types.h @@ -183,6 +183,7 @@ enum counter_target { CTGT_CITY }; #include "specenum_gen.h" /* Values used in the network protocol. */ +/* Update also properties table on actres.c when touching this. */ #define SPECENUM_NAME action_result #define SPECENUM_VALUE0 ACTRES_ESTABLISH_EMBASSY #define SPECENUM_VALUE0NAME "Unit Establish Embassy" @@ -315,9 +316,11 @@ enum counter_target { CTGT_CITY }; #define SPECENUM_VALUE64 ACTRES_CLEAN #define SPECENUM_VALUE64NAME "Clean" /* All consequences are handled as (ruleset) action data. */ -#define SPECENUM_COUNT ACTRES_NONE +#define SPECENUM_COUNT ACTRES_LAST #include "specenum_gen.h" +#define ACTRES_NONE ACTRES_LAST + /* Used in the network protocol. */ #define SPECENUM_NAME action_sub_result /* Will enter each enterable hut at the target tile */ diff --git a/common/game.c b/common/game.c index e3d7ebe51f..bf724563ad 100644 --- a/common/game.c +++ b/common/game.c @@ -30,6 +30,7 @@ #include "ai.h" #include "achievements.h" #include "actions.h" +#include "actres.h" #include "city.h" #include "connection.h" #include "counters.h" @@ -528,6 +529,7 @@ void game_ruleset_init(void) ruleset_cache_init(); disaster_types_init(); achievements_init(); + actres_init(); actions_init(); trade_route_types_init(); terrains_init(); @@ -598,6 +600,7 @@ void game_ruleset_free(void) city_styles_free(); styles_free(); actions_free(); + actres_free(); achievements_free(); disaster_types_free(); terrains_free(); diff --git a/meson.build b/meson.build index 2ac9d604c8..68994fbf6a 100644 --- a/meson.build +++ b/meson.build @@ -879,6 +879,7 @@ common_lib = library('freeciv', 'common/scriptcore/luascript_signal.c', 'common/achievements.c', 'common/actions.c', + 'common/actres.c', 'common/ai.c', 'common/base.c', 'common/borders.c', diff --git a/translations/core/POTFILES.in b/translations/core/POTFILES.in index b1a9f5e88f..657742ef59 100644 --- a/translations/core/POTFILES.in +++ b/translations/core/POTFILES.in @@ -174,6 +174,8 @@ client/tilespec.c client/tilespec.h common/actions.c common/actions.h +common/actres.c +common/actres.h common/ai.c common/calendar.c common/city.c -- 2.39.0