Freeciv-3.2
Loading...
Searching...
No Matches
autosettlers.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 1996 - A Kjeldberg, L Gregersen, P Unold
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__AUTOSETTLERS_H
14#define FC__AUTOSETTLERS_H
15
16/* common */
17#include "fc_types.h"
18#include "map.h"
19
21
22struct settlermap;
23struct pf_path;
24
25void adv_settlers_free(void);
26
27void auto_settlers_player(struct player *pplayer);
28
29void auto_settler_findwork(const struct civ_map *nmap,
30 struct player *pplayer,
31 struct unit *punit,
32 struct settlermap *state,
33 int recursion);
34
35bool auto_settler_setup_work(const struct civ_map *nmap,
36 struct player *pplayer, struct unit *punit,
37 struct settlermap *state, int recursion,
38 struct pf_path *path,
39 struct tile *best_tile,
41 struct extra_type **best_target,
42 int completion_time);
43
45 struct unit *punit,
47 struct extra_type **best_target,
48 struct tile **best_tile,
49 struct pf_path **path,
50 struct settlermap *state);
51
53 struct worker_task **best_task,
54 struct pf_path **path,
55 struct settlermap *state);
56
57void adv_unit_new_task(struct unit *punit, enum adv_unit_task task,
58 struct tile *ptile);
59
60bool adv_settler_safe_tile(const struct civ_map *nmap,
61 const struct player *pplayer, struct unit *punit,
62 struct tile *ptile);
63
65 struct tile *ptile, struct road_type *proad);
66
68 enum unit_activity activity,
70 struct extra_type *target,
71 const struct tile *ptile);
72
74
75#define as_transform_action_iterate(_act_) \
76{ \
77 action_array_iterate(as_actions_transform, _act_)
78
79#define as_transform_action_iterate_end \
80 action_array_iterate_end \
81}
82
84
85#define as_extra_action_iterate(_act_) \
86{ \
87 action_array_iterate(as_actions_extra, _act_)
88
89#define as_extra_action_iterate_end \
90 action_array_iterate_end \
91}
92
94
95#define as_rmextra_action_iterate(_act_) \
96{ \
97 action_array_iterate(as_actions_rmextra, _act_)
98
99#define as_rmextra_action_iterate_end \
100 action_array_iterate_end \
101}
102
103#endif /* FC__AUTOSETTLERS_H */
#define MAX_NUM_ACTIONS
Definition actions.h:314
action_id as_actions_rmextra[MAX_NUM_ACTIONS]
void adv_unit_new_task(struct unit *punit, enum adv_unit_task task, struct tile *ptile)
action_id as_actions_transform[MAX_NUM_ACTIONS]
bool auto_settler_setup_work(const struct civ_map *nmap, struct player *pplayer, struct unit *punit, struct settlermap *state, int recursion, struct pf_path *path, struct tile *best_tile, enum unit_activity best_act, struct extra_type **best_target, int completion_time)
void auto_settlers_ruleset_init(void)
struct city * settler_evaluate_city_requests(struct unit *punit, struct worker_task **best_task, struct pf_path **path, struct settlermap *state)
adv_want settler_evaluate_improvements(const struct civ_map *nmap, struct unit *punit, enum unit_activity *best_act, struct extra_type **best_target, struct tile **best_tile, struct pf_path **path, struct settlermap *state)
void auto_settlers_player(struct player *pplayer)
action_id as_actions_extra[MAX_NUM_ACTIONS]
adv_want adv_settlers_road_bonus(const struct civ_map *nmap, struct tile *ptile, struct road_type *proad)
bool adv_settler_safe_tile(const struct civ_map *nmap, const struct player *pplayer, struct unit *punit, struct tile *ptile)
void adv_settlers_free(void)
bool auto_settlers_speculate_can_act_at(const struct unit *punit, enum unit_activity activity, bool omniscient_cheat, struct extra_type *target, const struct tile *ptile)
void auto_settler_findwork(const struct civ_map *nmap, struct player *pplayer, struct unit *punit, struct settlermap *state, int recursion)
char * incite_cost
Definition comments.c:75
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
Definition dialogs_g.h:74
float adv_want
Definition fc_types.h:1354
adv_unit_task
Definition fc_types.h:370
int action_id
Definition fc_types.h:389
static int recursion[AIT_LAST]
Definition srv_log.c:45
Definition city.h:320
Definition tile.h:50
Definition unit.h:138