50 for (i = 0; i < ERM_COUNT; i++) {
58 requirement_vector_init(&(
extras[i].rmreqs));
59 requirement_vector_init(&(
extras[i].appearance_reqs));
60 requirement_vector_init(&(
extras[i].disappearance_reqs));
103 for (i = 0; i <
EC_LAST; i++) {
108 for (i = 0; i < ERM_COUNT; i++) {
120 requirement_vector_free(&(
extras[i].rmreqs));
121 requirement_vector_free(&(
extras[i].appearance_reqs));
122 requirement_vector_free(&(
extras[i].disappearance_reqs));
124 if (NULL !=
extras[i].helptext) {
131 if (pextra->hiders != NULL) {
132 extra_type_list_destroy(pextra->hiders);
133 pextra->hiders = NULL;
135 if (pextra->bridged != NULL) {
136 extra_type_list_destroy(pextra->bridged);
137 pextra->bridged = NULL;
271 struct extra_type_list *potential = extra_type_list_new();
278 extra_type_list_append(potential, pextra);
282 options = extra_type_list_size(potential);
285 selected = extra_type_list_get(potential,
fc_rand(options));
288 extra_type_list_destroy(potential);
300 extra_type_list_append(
caused_by[cause], pextra);
317 enum extra_rmcause rmcause)
321 extra_type_list_append(
removed_by[rmcause], pextra);
328 enum extra_rmcause rmcause)
330 return (pextra->
rmcauses & (1 << rmcause));
369 const struct tile *ptile)
388 const struct player *pplayer,
389 const struct tile *ptile)
443 const struct player *pplayer,
444 const struct tile *ptile)
463 const struct player *pplayer,
464 const struct tile *ptile)
487 if (pcity == NULL ||
city_owner(pcity) != pplayer) {
509 const struct tile *ptile)
532 const struct tile *ptile)
565 const struct player *pplayer,
566 const struct tile *ptile)
588 const struct tile *ptile)
609 const struct tile *ptile)
656 const struct tile *ptile)
688 const struct tile *ptile)
714 const struct tile *ptile)
741 const struct player *pplayer,
766 enum extra_rmcause rmcause,
767 const struct player *pplayer,
820 enum extra_flag_id flag)
840 enum extra_flag_id flag)
885 int efid =
id - EF_USER_FLAG_1;
903 if (helptxt && helptxt[0] !=
'\0') {
955 if (pextra1 == pextra2) {
985 & (1 << EC_IRRIGATION
998 & (1 << ERM_CLEANPOLLUTION
999 | 1 << ERM_CLEANFALLOUT
1000 | 1 << ERM_PILLAGE));
1007 const struct action *paction)
1018 const struct action *paction)
1031 case ACTIVITY_IRRIGATE:
1032 return EC_IRRIGATION;
1037 case ACTIVITY_GEN_ROAD:
1052 case ACTIVITY_PILLAGE:
1054 case ACTIVITY_POLLUTION:
1055 return ERM_CLEANPOLLUTION;
1056 case ACTIVITY_FALLOUT:
1057 return ERM_CLEANFALLOUT;
1105 const struct tile *ptile)
enum unit_activity actres_get_activity(enum action_result result)
void base_types_free(void)
#define BV_ISSET(bv, bit)
#define city_owner(_pcity_)
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs int actor_unit_id struct unit struct unit * punit
void user_flag_init(struct user_flag *flag)
void user_flag_free(struct user_flag *flag)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define cardinal_adjc_iterate_end
#define adjc_iterate(nmap, center_tile, itr_tile)
#define cardinal_adjc_iterate(nmap, center_tile, itr_tile)
static const char * rule_name_get(const struct name_translation *ptrans)
static const char * name_translation_get(const struct name_translation *ptrans)
bool player_knows_techs_with_flag(const struct player *pplayer, enum tech_flag_id flag)
bool are_reqs_active(const struct req_context *context, const struct player *other_player, const struct requirement_vector *reqs, const enum req_problem_type prob_type)
struct research * research_get(const struct player *pplayer)
enum tech_state research_invention_state(const struct research *presearch, Tech_type_id tech)
bool road_has_flag(const struct road_type *proad, enum road_flag_id flag)
void road_types_free(void)
void strvec_destroy(struct strvec *psv)
enum action_result result
struct packet_ruleset_control control
struct packet_game_info info
enum borders_mode borders
const struct player * player
struct player * extras_owner
struct extra_type * placing
enum unit_activity activity
int fc_strcasecmp(const char *str0, const char *str1)
void resource_types_free(void)
bool terrain_has_resource(const struct terrain *pterrain, const struct extra_type *presource)
#define terrain_has_flag(terr, flag)
void tile_virtual_destroy(struct tile *vtile)
void tile_remove_extra(struct tile *ptile, const struct extra_type *pextra)
struct tile * tile_virtual_new(const struct tile *ptile)
struct city * tile_city(const struct tile *ptile)
#define tile_worked(_tile)
#define tile_terrain(_tile)
#define tile_has_extra(ptile, pextra)
#define tile_owner(_tile)
bool unit_can_do_action_sub_result(const struct unit *punit, enum action_sub_result sub_result)
bool unit_can_do_action_result(const struct unit *punit, enum action_result result)
#define tile_changing_activities_iterate_end
#define tile_changing_activities_iterate(_act_)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_end
const struct unit_type * unit_type_get(const struct unit *punit)
#define uclass_index(_c_)