Freeciv-3.3: /fast/freeciv/nightly/main/common/ai.h Source File

Freeciv-3.3

Loading...
Searching...
No Matches
ai.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__AI_H
14#define FC__AI_H
15
16#ifdef __cplusplus
17extern "C" {
18#endif /* __cplusplus */
19
20/* common */
21#include "fc_types.h" /* MAX_LEN_NAME */
22
23/* Update this capability string when ever there is changes to ai_type
24 * structure below. When changing mandatory capability part, check that
25 * there's enough reserved_xx pointers in the end of the structure for
26 * taking to use without need to bump mandatory capability again. */
27#define FC_AI_MOD_CAPSTR "+Freeciv-3.3-ai-module-2023.Jul.18"
28
29/* Timers for all AI activities. Define it to get statistics about the AI. */
30#ifdef FREECIV_DEBUG
31# undef DEBUG_AITIMERS
32#endif /* FREECIV_DEBUG */
33
34struct Treaty;
35struct player;
36struct adv_choice;
37struct city;
38struct unit;
39struct tile;
40struct workermap;
41struct pf_path;
42struct section_file;
43struct adv_data;
44
45 enum incident_type {
46 INCIDENT_ACTION = 0, INCIDENT_WAR, INCIDENT_LAST
47};
48
49 struct ai_type
50{
51 char name[MAX_LEN_NAME];
52
53 void *private;
54
55 struct {
56 /* Called for every AI type when server quits. */
57 void (*module_close)(void);
58
59 /* Called for every AI type when game starts. Game is not necessarily new one,
60 it can also be an old game loaded from a savegame. */
61 void (*game_start)(void);
62
63 /* Called for every AI type when game has ended. */
64 void (*game_free)(void);
65
66 /* Called for every AI type when map tiles are allocated. */
67 void (*map_alloc)(void);
68
69 /* Called for every AI type when the game map is ready, either generated
70 * or, in case of scenario, loaded. */
71 void (*map_ready)(void);
72
73 /* Called for every AI type when map tiles are freed. */
74 void (*map_free)(void);
75
76 /* Called for every AI type when new player is added to game. */
77 void (*player_alloc)(struct player *pplayer);
78
79 /* Called for every AI type when player is freed from game. */
80 void (*player_free)(struct player *pplayer);
81
82 /* Called for every AI type for each player in game when game saved. */
83 void (*player_save)(struct player *pplayer, struct section_file *file,
84 int plrno);
85
86 /* Called for every AI type for each player in game when game loaded. */
87 void (*player_load)(struct player *pplayer, const struct section_file *file,
88 int plrno);
89
90 /* Called for every AI type for each player in game when game saved,
91 * with each other player as parameter.
92 * In practice it's good to use player_save_relations when you
93 * want to add entries to "player%d.ai%d", but player_iterate() inside
94 * player_save is better otherwise. The difference is in how clean
95 * structure the produced savegame will have. */
96 void (*player_save_relations)(struct player *pplayer, struct player *other,
97 struct section_file *file, int plrno);
98
99 /* Called for every AI type for each player in game when game loaded,
100 * with each other player as parameter. */
101 void (*player_load_relations)(struct player *pplayer, struct player *other,
102 const struct section_file *file, int plrno);
103
104 /* AI console. */
105 void (*player_console)(struct player *pplayer, const char *cmd);
106
107 /* Called for AI type that gains control of player. */
108 void (*gained_control)(struct player *pplayer);
109
110 /* Called for AI type that loses control of player. */
111 void (*lost_control)(struct player *pplayer);
112
113 /* Called for AI type of the player who gets split to two. */
114 void (*split_by_civil_war)(struct player *original, struct player *created);
115
116 /* Called for AI type of the player who got created from the split. */
117 void (*created_by_civil_war)(struct player *original, struct player *created);
118
119 /* Called for player AI type when player phase begins. This is in the
120 * beginning of phase setup. See also first_activities. */
121 void (*phase_begin)(struct player *pplayer, bool new_phase);
122
123 /* Called for player AI type when player phase ends. */
124 void (*phase_finished)(struct player *pplayer);
125
126 /* Called for every AI type when new city is added to game. Called even for
127 * virtual cities. */
128 void (*city_alloc)(struct city *pcity);
129
130 /* Called for every AI type when new city is removed from game. Called even for
131 * virtual cities. */
132 void (*city_free)(struct city *pcity);
133
134 /* Called for every AI type when new city is added to game. Called for real cities
135 * only. */
136 void (*city_created)(struct city *pcity);
137
138 /* Called for every AI type when new city is removed from game. Called for real
139 * cities only. */
140 void (*city_destroyed)(struct city *pcity);
141
142 /* Called for player AI type when player gains control of city. */
143 void (*city_got)(struct player *pplayer, struct city *pcity);
144
145 /* Called for player AI type when player loses control of city. */
146 void (*city_lost)(struct player *pplayer, struct city *pcity);
147
148 /* Called for every AI type for each city in game when game saved. */
149 void (*city_save)(struct section_file *file, const struct city *pcity,
150 const char *citystr);
151
152 /* Called for every AI type for each city in game when game loaded. */
153 void (*city_load)(const struct section_file *file, struct city *pcity,
154 const char *citystr);
155
156 /* Called for player AI type when building advisor has chosen something
157 * to be built in a city. This can override that decision. */
158 void (*choose_building)(struct city *pcity, struct adv_choice *choice);
159
160 /* Called for player AI when building advisor prepares to make decisions. */
161 void (*build_adv_prepare)(struct player *pplayer, struct adv_data *adv);
162
163 /* Called for every AI type when building advisor is first initialized
164 * for the turn. */
165 void (*build_adv_init)(struct player *pplayer);
166
167 /* Called for player AI when building advisor should set wants for buildings.
168 * Without this implemented in AI type building advisor does not adjust wants
169 * at all. */
170 void (*build_adv_adjust_want)(struct player *pplayer, struct city *wonder_city);
171
172 /* Called for player AI when evaluating governments. */
173 void (*gov_value)(struct player *pplayer, struct government *gov,
174 adv_want *val, bool *override);
175
176 /* Called for every AI type when unit ruleset has been loaded. */
177 void (*units_ruleset_init)(void);
178
179 /* Called for every AI type before unit ruleset gets reloaded. */
180 void (*units_ruleset_close)(void);
181
182 /* Called for every AI type when new unit is added to game. Called even for
183 * virtual units. */
184 void (*unit_alloc)(struct unit *punit);
185
186 /* Called for every AI type when unit is removed from game. Called even for
187 * virtual units. */
188 void (*unit_free)(struct unit *punit);
189
190 /* Called for every AI type when new unit is added to game. Called for real
191 * units only. */
192 void (*unit_created)(struct unit *punit);
193
194 /* Called for every AI type when unit is removed from game. Called for real
195 * units only. */
196 void (*unit_destroyed)(struct unit *punit);
197
198 /* Called for player AI type when player gains control of unit. */
199 void (*unit_got)(struct unit *punit);
200
201 /* Called for player AI type when unit changes type. */
202 void (*unit_transformed)(struct unit *punit, const struct unit_type *old_type);
203
204 /* Called for player AI type when player loses control of unit. */
205 void (*unit_lost)(struct unit *punit);
206
207 /* Called for unit owner AI type for each unit when turn ends. */
208 void (*unit_turn_end)(struct unit *punit);
209
210 /* Called for unit owner AI type when advisors goto moves unit. */
211 void (*unit_move)(struct unit *punit, struct tile *ptile,
212 struct pf_path *path, int step);
213
214 /* Called for all AI types when ever unit has moved. */
215 void (*unit_move_seen)(struct unit *punit);
216
217 /* Called for unit owner AI type when new advisor task is set for unit. */
218 void (*unit_task)(struct unit *punit, enum adv_unit_task task,
219 struct tile *ptile);
220
221 /* Called for every AI type for each unit in game when game saved. */
222 void (*unit_save)(struct section_file *file, const struct unit *punit,
223 const char *unitstr);
224
225 /* Called for every AI type for each unit in game when game loaded. */
226 void (*unit_load)(const struct section_file *file, struct unit *punit,
227 const char *unitstr);
228
229 /* Called for player AI type when autoworkers have been handled for the turn. */
230 void (*settler_reset)(struct player *pplayer);
231
232 /* Called for player AI type when autoworkers should find new work. */
233 void (*settler_run)(struct player *pplayer, struct unit *punit,
234 struct workermap *state);
235
236 /* Called for player AI type for each autoworker still working.
237 Cancelling current work there will result in settler_run() call. */
238 void (*settler_cont)(struct player *pplayer, struct unit *punit,
239 struct workermap *state);
240
241 /* Called for player AI type when unit wants to autoexplore towards a tile. */
242 void (*want_to_explore)(struct unit *punit, struct tile *target,
243 enum override_bool *allow);
244
245 /* Called for player AI type in the beginning of player phase.
246 * Unlike with phase_begin, everything is set up for phase already. */
247 void (*first_activities)(struct player *pplayer);
248
249 /* Called for player AI when player phase is already active when AI gains control. */
250 void (*restart_phase)(struct player *pplayer);
251
252 /* Called for player AI type in the beginning of player phase. Not for barbarian
253 * players. */
254 void (*diplomacy_actions)(struct player *pplayer);
255
256 /* Called for player AI type in the end of player phase. */
257 void (*last_activities)(struct player *pplayer);
258
259 /* Called for player AI type when diplomatic treaty requires evaluation. */
260 void (*treaty_evaluate)(struct player *pplayer, struct player *aplayer,
261 struct Treaty *ptreaty);
262
263 /* Called for player AI type when diplomatic treaty has been accepted
264 * by both parties. */
265 void (*treaty_accepted)(struct player *pplayer, struct player *aplayer,
266 struct Treaty *ptreaty);
267
268 /* Called for player AI type when first contact with another player has been
269 * established. Note that when contact is between two AI players, callback
270 * might be already called for the other party, so you can't assume
271 * relations to be all-pristine when this gets called. */
272 void (*first_contact)(struct player *pplayer, struct player *aplayer);
273
274 /* Called for player AI type of the victim when someone does some violation
275 * against them. */
276 void (*incident)(enum incident_type type, enum casus_belli_range scope,
277 const struct action *paction,
278 struct player *receiver,
279 struct player *violator, struct player *victim);
280
281 /* Called for player AI type of city owner when logging requires city debug
282 * information. */
283 void (*log_fragment_city)(char *buffer, int buflength, const struct city *pcity);
284
285 /* Called for player AI type of unit owner when logging requires unit debug
286 * information. */
287 void (*log_fragment_unit)(char *buffer, int buflength, const struct unit *punit);
288
289 /* Called for player AI type to decide if another player is dangerous. */
290 void (*consider_plr_dangerous)(struct player *plr1, struct player *plr2,
291 enum override_bool *result);
292
293 /* Called for player AI type to decide if it's dangerous for unit to enter tile. */
294 void (*consider_tile_dangerous)(struct tile *ptile, struct unit *punit,
295 enum override_bool *result);
296
297 /* Called for player AI to decide if city can be chosen to act as wonder city
298 * for building advisor. */
299 void (*consider_wonder_city)(struct city *pcity, bool *result);
300
301 /* Called for player AI type with short internval */
302 void (*refresh)(struct player *pplayer);
303
304 /* Called for every AI type when tile has changed */
305 void (*tile_info)(struct tile *ptile);
306
307 /* Called for every AI type when certain kind of city change has taken place.
308 * Currently this gets called when:
309 * - city changes owner.
310 */
311 void (*city_info)(struct city *pcity);
312
313 /* Called for every AI type when certain kind of unit change has taken place.
314 * Currently this gets called when:
315 * - unit updates & conversions
316 */
317 void (*unit_info)(struct unit *punit);
318
319 /* Called for player AI when revolution starts. */
320 void (*revolution_start)(struct player *pplayer);
321
322 /* These are here reserving space for future optional callbacks.
323 * This way we don't need to change the mandatory capability of the AI module
324 * interface when adding such callbacks, but existing modules just have these
325 * set to NULL. Optional capability should be set when taking one of these to use,
326 * so that new modules know if the server is going to call these or is it too old
327 * version to do so.
328 * When mandatory capability then changes again, please add new reservations to
329 * replace those taken to use. */
330 void (*reserved_01)(void);
331 void (*reserved_02)(void);
332 void (*reserved_03)(void);
333 void (*reserved_04)(void);
334 void (*reserved_05)(void);
335 } funcs;
336};
337
338struct ai_type *ai_type_alloc(void);
339void ai_type_dealloc(void);
340struct ai_type *get_ai_type(int id);
341int ai_type_number(const struct ai_type *ai);
342void init_ai(struct ai_type *ai);
343int ai_type_get_count(void);
344const char *ai_name(const struct ai_type *ai);
345
346struct ai_type *ai_type_by_name(const char *search);
347const char *ai_type_name_or_fallback(const char *orig_name);
348
349#ifdef DEBUG_AITIMERS
350void ai_timer_init(void);
351void ai_timer_free(void);
352void ai_timer_start(const struct ai_type *ai);
353void ai_timer_stop(const struct ai_type *ai);
354void ai_timer_player_start(const struct player *pplayer);
355void ai_timer_player_stop(const struct player *pplayer);
356#else
357#define ai_timer_init(...) (void) 0
358#define ai_timer_free(...) (void) 0
359#define ai_timer_start(...) (void) 0
360#define ai_timer_stop(...) (void) 0
361#define ai_timer_player_start(...) (void) 0
362#define ai_timer_player_stop(...) (void) 0
363#endif /* DEBUG_AITIMERS */
364
365#define ai_type_iterate(NAME_ai) \
366 do { \
367 int _aii_; \
368 int _aitotal_ = ai_type_get_count(); \
369 for (_aii_ = 0; _aii_ < _aitotal_ ; _aii_++) { \
370 struct ai_type *NAME_ai = get_ai_type(_aii_);
371
372#define ai_type_iterate_end \
373 } \
374 } while (FALSE);
375
376/* FIXME: This should also check if player is ai controlled */
377#define CALL_PLR_AI_FUNC(_func, _player, ...) \
378 do { \
379 struct player *_plr_ = _player; /* _player expanded just once */ \
380 if (_plr_ && _plr_->ai && _plr_->ai->funcs._func) { \
381 ai_timer_player_start(_plr_); \
382 _plr_->ai->funcs._func( __VA_ARGS__ ); \
383 ai_timer_player_stop(_plr_); \
384 } \
385 } while (FALSE)
386
387#define CALL_FUNC_EACH_AI(_func, ...) \
388 do { \
389 ai_type_iterate(_ait_) { \
390 if (_ait_->funcs._func) { \
391 ai_timer_start(_ait_); \
392 _ait_->funcs._func( __VA_ARGS__ ); \
393 ai_timer_stop(_ait_); \
394 } \
395 } ai_type_iterate_end; \
396 } while (FALSE)
397
398#ifdef __cplusplus
399}
400#endif /* __cplusplus */
401
402#endif /* FC__AI_H */
ai_timer_start
#define ai_timer_start(...)
Definition ai.h:359
init_ai
void init_ai(struct ai_type *ai)
Definition ai.c:270
ai_timer_stop
#define ai_timer_stop(...)
Definition ai.h:360
ai_timer_free
#define ai_timer_free(...)
Definition ai.h:358
ai_name
const char * ai_name(const struct ai_type *ai)
Definition ai.c:335
ai_timer_player_start
#define ai_timer_player_start(...)
Definition ai.h:361
ai_timer_init
#define ai_timer_init(...)
Definition ai.h:357
ai_type_alloc
struct ai_type * ai_type_alloc(void)
Definition ai.c:304
ai_type_name_or_fallback
const char * ai_type_name_or_fallback(const char *orig_name)
Definition ai.c:346
incident_type
incident_type
Definition ai.h:45
INCIDENT_LAST
@ INCIDENT_LAST
Definition ai.h:46
INCIDENT_WAR
@ INCIDENT_WAR
Definition ai.h:46
INCIDENT_ACTION
@ INCIDENT_ACTION
Definition ai.h:46
ai_type_by_name
struct ai_type * ai_type_by_name(const char *search)
Definition ai.c:290
ai_type_get_count
int ai_type_get_count(void)
Definition ai.c:327
ai_type_dealloc
void ai_type_dealloc(void)
Definition ai.c:319
get_ai_type
struct ai_type * get_ai_type(int id)
Definition ai.c:260
ai_timer_player_stop
#define ai_timer_player_stop(...)
Definition ai.h:362
ai_type_number
int ai_type_number(const struct ai_type *ai)
Definition ai.c:278
unit_info
Definition citydlg.h:197
incite_cost
char * incite_cost
Definition comments.c:74
punit
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
ptreaty
struct Treaty * ptreaty
Definition diplodlg_g.h:28
fc_types.h
adv_want
float adv_want
Definition fc_types.h:1335
adv_unit_task
adv_unit_task
Definition fc_types.h:374
MAX_LEN_NAME
#define MAX_LEN_NAME
Definition fc_types.h:66
override_bool
override_bool
Definition fc_types.h:94
type
GType type
Definition repodlgs.c:1313
step
int step
Definition specpq.h:92
Treaty
Definition diptreaty.h:79
action
Definition actions.h:106
adv_choice
Definition advchoice.h:45
adv_data
Definition advdata.h:50
ai_type
Definition ai.h:50
ai_type::revolution_start
void(* revolution_start)(struct player *pplayer)
Definition ai.h:320
ai_type::log_fragment_unit
void(* log_fragment_unit)(char *buffer, int buflength, const struct unit *punit)
Definition ai.h:287
ai_type::reserved_02
void(* reserved_02)(void)
Definition ai.h:331
ai_type::city_alloc
void(* city_alloc)(struct city *pcity)
Definition ai.h:128
ai_type::created_by_civil_war
void(* created_by_civil_war)(struct player *original, struct player *created)
Definition ai.h:117
ai_type::consider_tile_dangerous
void(* consider_tile_dangerous)(struct tile *ptile, struct unit *punit, enum override_bool *result)
Definition ai.h:294
ai_type::unit_lost
void(* unit_lost)(struct unit *punit)
Definition ai.h:205
ai_type::treaty_evaluate
void(* treaty_evaluate)(struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty)
Definition ai.h:260
ai_type::gov_value
void(* gov_value)(struct player *pplayer, struct government *gov, adv_want *val, bool *override)
Definition ai.h:173
ai_type::treaty_accepted
void(* treaty_accepted)(struct player *pplayer, struct player *aplayer, struct Treaty *ptreaty)
Definition ai.h:265
ai_type::unit_transformed
void(* unit_transformed)(struct unit *punit, const struct unit_type *old_type)
Definition ai.h:202
ai_type::log_fragment_city
void(* log_fragment_city)(char *buffer, int buflength, const struct city *pcity)
Definition ai.h:283
ai_type::settler_run
void(* settler_run)(struct player *pplayer, struct unit *punit, struct workermap *state)
Definition ai.h:233
ai_type::unit_load
void(* unit_load)(const struct section_file *file, struct unit *punit, const char *unitstr)
Definition ai.h:226
ai_type::unit_move
void(* unit_move)(struct unit *punit, struct tile *ptile, struct pf_path *path, int step)
Definition ai.h:211
ai_type::reserved_03
void(* reserved_03)(void)
Definition ai.h:332
ai_type::unit_free
void(* unit_free)(struct unit *punit)
Definition ai.h:188
ai_type::map_alloc
void(* map_alloc)(void)
Definition ai.h:67
ai_type::phase_finished
void(* phase_finished)(struct player *pplayer)
Definition ai.h:124
ai_type::tile_info
void(* tile_info)(struct tile *ptile)
Definition ai.h:305
ai_type::restart_phase
void(* restart_phase)(struct player *pplayer)
Definition ai.h:250
ai_type::settler_reset
void(* settler_reset)(struct player *pplayer)
Definition ai.h:230
ai_type::unit_save
void(* unit_save)(struct section_file *file, const struct unit *punit, const char *unitstr)
Definition ai.h:222
ai_type::refresh
void(* refresh)(struct player *pplayer)
Definition ai.h:302
ai_type::game_free
void(* game_free)(void)
Definition ai.h:64
ai_type::unit_created
void(* unit_created)(struct unit *punit)
Definition ai.h:192
ai_type::units_ruleset_close
void(* units_ruleset_close)(void)
Definition ai.h:180
ai_type::city_destroyed
void(* city_destroyed)(struct city *pcity)
Definition ai.h:140
ai_type::diplomacy_actions
void(* diplomacy_actions)(struct player *pplayer)
Definition ai.h:254
ai_type::player_alloc
void(* player_alloc)(struct player *pplayer)
Definition ai.h:77
ai_type::build_adv_prepare
void(* build_adv_prepare)(struct player *pplayer, struct adv_data *adv)
Definition ai.h:161
ai_type::build_adv_adjust_want
void(* build_adv_adjust_want)(struct player *pplayer, struct city *wonder_city)
Definition ai.h:170
ai_type::city_info
void(* city_info)(struct city *pcity)
Definition ai.h:311
ai_type::player_load
void(* player_load)(struct player *pplayer, const struct section_file *file, int plrno)
Definition ai.h:87
ai_type::build_adv_init
void(* build_adv_init)(struct player *pplayer)
Definition ai.h:165
ai_type::city_lost
void(* city_lost)(struct player *pplayer, struct city *pcity)
Definition ai.h:146
ai_type::unit_task
void(* unit_task)(struct unit *punit, enum adv_unit_task task, struct tile *ptile)
Definition ai.h:218
ai_type::reserved_01
void(* reserved_01)(void)
Definition ai.h:330
ai_type::last_activities
void(* last_activities)(struct player *pplayer)
Definition ai.h:257
ai_type::incident
void(* incident)(enum incident_type type, enum casus_belli_range scope, const struct action *paction, struct player *receiver, struct player *violator, struct player *victim)
Definition ai.h:276
ai_type::first_contact
void(* first_contact)(struct player *pplayer, struct player *aplayer)
Definition ai.h:272
ai_type::map_free
void(* map_free)(void)
Definition ai.h:74
ai_type::city_created
void(* city_created)(struct city *pcity)
Definition ai.h:136
ai_type::city_save
void(* city_save)(struct section_file *file, const struct city *pcity, const char *citystr)
Definition ai.h:149
ai_type::consider_wonder_city
void(* consider_wonder_city)(struct city *pcity, bool *result)
Definition ai.h:299
ai_type::city_free
void(* city_free)(struct city *pcity)
Definition ai.h:132
ai_type::choose_building
void(* choose_building)(struct city *pcity, struct adv_choice *choice)
Definition ai.h:158
ai_type::funcs
struct ai_type::@14 funcs
ai_type::player_save_relations
void(* player_save_relations)(struct player *pplayer, struct player *other, struct section_file *file, int plrno)
Definition ai.h:96
ai_type::module_close
void(* module_close)(void)
Definition ai.h:57
ai_type::city_load
void(* city_load)(const struct section_file *file, struct city *pcity, const char *citystr)
Definition ai.h:153
ai_type::unit_destroyed
void(* unit_destroyed)(struct unit *punit)
Definition ai.h:196
ai_type::player_load_relations
void(* player_load_relations)(struct player *pplayer, struct player *other, const struct section_file *file, int plrno)
Definition ai.h:101
ai_type::phase_begin
void(* phase_begin)(struct player *pplayer, bool new_phase)
Definition ai.h:121
ai_type::player_free
void(* player_free)(struct player *pplayer)
Definition ai.h:80
ai_type::split_by_civil_war
void(* split_by_civil_war)(struct player *original, struct player *created)
Definition ai.h:114
ai_type::unit_turn_end
void(* unit_turn_end)(struct unit *punit)
Definition ai.h:208
ai_type::city_got
void(* city_got)(struct player *pplayer, struct city *pcity)
Definition ai.h:143
ai_type::unit_alloc
void(* unit_alloc)(struct unit *punit)
Definition ai.h:184
ai_type::gained_control
void(* gained_control)(struct player *pplayer)
Definition ai.h:108
ai_type::name
char name[MAX_LEN_NAME]
Definition ai.h:51
ai_type::map_ready
void(* map_ready)(void)
Definition ai.h:71
ai_type::unit_got
void(* unit_got)(struct unit *punit)
Definition ai.h:199
ai_type::player_console
void(* player_console)(struct player *pplayer, const char *cmd)
Definition ai.h:105
ai_type::reserved_04
void(* reserved_04)(void)
Definition ai.h:333
ai_type::player_save
void(* player_save)(struct player *pplayer, struct section_file *file, int plrno)
Definition ai.h:83
ai_type::first_activities
void(* first_activities)(struct player *pplayer)
Definition ai.h:247
ai_type::consider_plr_dangerous
void(* consider_plr_dangerous)(struct player *plr1, struct player *plr2, enum override_bool *result)
Definition ai.h:290
ai_type::game_start
void(* game_start)(void)
Definition ai.h:61
ai_type::lost_control
void(* lost_control)(struct player *pplayer)
Definition ai.h:111
ai_type::units_ruleset_init
void(* units_ruleset_init)(void)
Definition ai.h:177
ai_type::settler_cont
void(* settler_cont)(struct player *pplayer, struct unit *punit, struct workermap *state)
Definition ai.h:238
ai_type::unit_move_seen
void(* unit_move_seen)(struct unit *punit)
Definition ai.h:215
ai_type::reserved_05
void(* reserved_05)(void)
Definition ai.h:334
ai_type::want_to_explore
void(* want_to_explore)(struct unit *punit, struct tile *target, enum override_bool *allow)
Definition ai.h:242
city
Definition city.h:320
government
Definition government.h:52
pf_path
Definition path_finding.h:344
player
Definition player.h:249
section_file
Definition section_file.h:36
tile
Definition tile.h:50
unit_type
Definition unittype.h:507
unit
Definition unit.h:140
workermap
Definition autoworkers.c:72