34 enum unit_activity best_act,
58 enum unit_activity activity,
59 bool omniscient_cheat,
61 const struct tile *ptile);
65 #define as_transform_action_iterate(_act_) \
67 action_list_iterate(as_actions_transform, _act_)
69 #define as_transform_action_iterate_end \
70 action_list_iterate_end \
75 #define as_extra_action_iterate(_act_) \
77 action_list_iterate(as_actions_extra, _act_)
79 #define as_extra_action_iterate_end \
80 action_list_iterate_end \
85 #define as_rmextra_action_iterate(_act_) \
87 action_list_iterate(as_actions_rmextra, _act_)
89 #define as_rmextra_action_iterate_end \
90 action_list_iterate_end \
bool adv_settler_safe_tile(const struct player *pplayer, struct unit *punit, struct tile *ptile)
Do we consider tile safe for autosettler to work?
action_id as_actions_rmextra[MAX_NUM_ACTIONS]
void adv_unit_new_task(struct unit *punit, enum adv_unit_task task, struct tile *ptile)
Change unit's advisor task.
action_id as_actions_transform[MAX_NUM_ACTIONS]
bool auto_settler_setup_work(struct player *pplayer, struct unit *punit, struct settlermap *state, int recursion, PFPath *path, struct tile *best_tile, enum unit_activity best_act, struct extra_type **best_target, int completion_time)
Setup our settler to do the work it has found.
adv_want adv_settlers_road_bonus(struct tile *ptile, struct road_type *proad)
Calculate the attractiveness of building a road/rail at the given tile.
void auto_settler_findwork(struct player *pplayer, struct unit *punit, struct settlermap *state, int recursion)
Find some work for our settlers and/or workers.
void auto_settlers_player(struct player *pplayer)
Run through all the players settlers and let those on ai.control work automagically.
void auto_settlers_ruleset_init()
Initialize auto settlers based on the ruleset.
action_id as_actions_extra[MAX_NUM_ACTIONS]
struct city * settler_evaluate_city_requests(struct unit *punit, struct worker_task **best_task, PFPath *path, struct settlermap *state)
Return best city request to fulfill.
void adv_settlers_free()
Free resources allocated for autosettlers system.
adv_want settler_evaluate_improvements(unit *punit, unit_activity *best_act, extra_type **best_target, tile **best_tile, PFPath *path, settlermap *state)
Finds tiles to improve, using punit.
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)
Returns TRUE iff the unit can do the targeted activity at the given location.
static int recursion[AIT_LAST]