71 ACTION_DISBAND_UNIT_RECOVER,
291 enum unit_activity activity,
373 "Unit %d started action selection before unit %d was done",
509 bool focus_changed =
FALSE;
524 focus_changed =
TRUE;
594 bool keep_in_focus =
FALSE;
622 keep_in_focus =
TRUE;
626 if (!keep_in_focus) {
691 struct unit *candidate = NULL;
728 }
else if (NULL == focus_tile
733 }
else if (NULL == candidate) {
738 if (NULL != candidate) {
749 if (NULL == candidate) {
761 if (!candidate && accept_current) {
777 && num_units_in_old_focus > 0
825 struct unit *panyowned = NULL, *panyother = NULL, *ptptother = NULL;
828 if (unit_list_size(ptile->
units) == 0) {
873 }
else if (!panyowned) {
880 }
else if (!panyother) {
886 return (panyowned ? panyowned : (ptptother ? ptptother : panyother));
895 static struct timer *blink_timer = NULL;
927 static struct timer *blink_timer = NULL;
928 const double blink_time = 0.5;
935 int is_waiting = 0, is_moving = 0;
943 blocking_mode =
FALSE;
947 if ((pplayer->is_connected || blocking_mode)
949 if (pplayer->phase_done) {
957 if (is_moving == 1 && is_waiting > 0) {
990 if (punitlist && unit_list_size(punitlist) > 0
997 struct unit *
punit = unit_list_get(punitlist, 0);
1003 if (aunit !=
punit) {
1052 struct unit *old_actor_unit;
1059 "Decision taken for %d but selection is for %d.",
1063 if (old_actor_unit != NULL
1137 if (unit_list_size(punits) == 0) {
1160 _(
"Only %s can do %s."),
1168 _(
"%s can't do %s."),
1180 NO_TARGET, sub_tgt_id, act_id, last_order);
1197 const struct tile *ptile)
1217 struct city *pcity = NULL;
1249 pcity = ptile ?
tile_city(ptile) : NULL;
1257 }
else if (NULL != pcity
1317 enum unit_activity activity)
1335 const struct player *pplayer,
int rec)
1337 int activity_mc = 0;
1356 if (single_mc < 0) {
1360 activity_mc += single_mc;
1365 if (
punit != NULL) {
1369 }
else if (pplayer != NULL) {
1401 &for_unit, &for_tile);
1411 enum unit_activity activity,
1429 case ACTIVITY_GEN_ROAD:
1449 return build_time >= 0;
1452 case ACTIVITY_IRRIGATE:
1488 && (activity == ACTIVITY_GEN_ROAD
1489 || activity == ACTIVITY_IRRIGATE))) {
1509 struct unit *plast = NULL;
1513 _(
"Only transporter units can be unloaded."));
1521 if (pcargo->activity == ACTIVITY_SENTRY) {
1563 order.activity = ACTIVITY_SENTRY;
1603#define SPECHASH_TAG unit_type
1604#define SPECHASH_IKEY_TYPE struct unit_type *
1605#define SPECHASH_IDATA_TYPE void *
1608#define SPECHASH_TAG continent
1609#define SPECHASH_INT_KEY_TYPE
1610#define SPECHASH_IDATA_TYPE void *
1617 enum unit_select_type_mode seltype,
1618 enum unit_select_location_mode selloc)
1620 const struct player *pplayer;
1621 const struct tile *ptile;
1622 struct unit *punit_first;
1623 struct tile_hash *tile_table;
1624 struct unit_type_hash *type_table;
1625 struct continent_hash *cont_table;
1628 || unit_list_size(punits) < 1) {
1632 punit_first = unit_list_get(punits, 0);
1634 if (seltype == SELTYPE_SINGLE) {
1640 tile_table = tile_hash_new();
1641 type_table = unit_type_hash_new();
1642 cont_table = continent_hash_new();
1645 if (seltype == SELTYPE_SAME) {
1650 if (selloc == SELLOC_TILE) {
1651 tile_hash_insert(tile_table, ptile, NULL);
1652 }
else if (selloc == SELLOC_CONT) {
1657 if (selloc == SELLOC_TILE) {
1663 if (seltype == SELTYPE_SAME
1673 if ((seltype == SELTYPE_SAME
1675 || (selloc == SELLOC_CONT
1685 tile_hash_destroy(tile_table);
1686 unit_type_hash_destroy(type_table);
1687 continent_hash_destroy(cont_table);
1702 int target_id,
int sub_tgt,
const char *
name)
1710 actor_id, actor_id, target_id, sub_tgt,
name,
1725 actor_id, actor_id, target_id,
action,
1760 struct tile *dest_tile)
1772 memset(&p, 0,
sizeof(p));
1806 struct tile *dest_tile;
1827 memset(&p, 0,
sizeof(p));
1864 enum unit_activity act,
1901 int last_request_id_used;
1912 if (
punit == NULL) {
1917 if (data->
alt == -1) {
1921 _(
"Unable to get rid of %s."),
1931 next->
alt = data->
alt - 1;
2056 enum server_side_agent
agent)
2074 _(
"Only settler units can be put into auto mode."));
2095 ? ACTRES_TRANSPORT_BOARD
2096 : ACTRES_TRANSPORT_EMBARK) {
2129 pcargo->
id, ptrans->
id, 0,
"");
2132 ptrans->
id, pcargo->
id, 0,
"");
2136 && pcargo->
activity == ACTIVITY_SENTRY) {
2156 if (
action == ACTION_TRADE_ROUTE) {
2159 }
else if (
action == ACTION_HELP_WONDER) {
2174 struct tile *offender = NULL;
2176 if (unit_list_size(punits) == 0) {
2192 _(
"Click on a tile to paradrop to it."));
2199 _(
"Only paratrooper units can do this."));
2210 if (unit_list_size(punits) == 0) {
2257 bv_extras pspossible;
2275 if (target != NULL) {
2693 bool was_teleported, do_animation;
2739 }
else if (do_animation) {
2799 bool maybe_goto =
FALSE;
2838 }
else if (NULL != pcity
2842 }
else if (unit_list_size(ptile->
units) == 0
2846 }
else if (unit_list_size(ptile->
units) == 1
2863 }
else if (unit_list_size(ptile->
units) > 0) {
2887 int listsize = unit_list_size(ptile->
units);
2888 struct unit *panytransporter = NULL,
2889 *panymovesea = NULL, *panysea = NULL,
2890 *panymoveland = NULL, *panyland = NULL,
2891 *panymoveunit = NULL, *panyunit = NULL;
2899 if (listsize == 0) {
2901 }
else if (listsize == 1) {
2928 }
else if (!panytransporter) {
2929 panytransporter =
punit;
2936 panymovesea =
punit;
2938 }
else if (!panysea) {
2947 }
else if (!panymoveland) {
2948 panymoveland =
punit;
2950 }
else if (!panyland) {
2956 panymovesea =
punit;
2963 panymoveunit =
punit;
2971 if (panytransporter) {
2972 return panytransporter;
2973 }
else if (panymovesea) {
2975 }
else if (panysea) {
2977 }
else if (panymoveunit) {
2978 return panymoveunit;
2979 }
else if (panyunit) {
2985 return panymoveland;
2986 }
else if (panyland) {
2988 }
else if (panymovesea) {
2990 }
else if (panysea) {
2992 }
else if (panymoveunit) {
2993 return panymoveunit;
2994 }
else if (panyunit) {
3020 _(
"Didn't find a route to the destination!"));
3029 struct action *paradrop_action = NULL;
3044 if (paradrop_action == NULL) {
3046 paradrop_action = paction;
3058 if (paradrop_action != NULL) {
3074 _(
"Didn't find a route to the destination!"));
3084 enum unit_activity activity,
3091 _(
"Didn't find a route to the destination!"));
3146 _(
"Oh my! You seem to have no capital!"));
3280 _(
"Click on a tile to do %s against it."),
3294 _(
"Click on a tile to act against it. "
3295 "Press 'd' again to act against own tile."));
3352 struct unit *pnext_focus = NULL, *plast;
3356 pnext_focus = plast;
3510 enum extra_rmcause rmcause)
3703 if (unit_list_size(
battlegroups[battlegroup]) == 0 && !append) {
3710 if (i == 0 && !append) {
const char * action_name_translation(const struct action *action)
const char * action_id_name_translation(action_id act_id)
bool action_prob_possible(const struct act_prob probability)
struct act_prob action_prob_vs_tile(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct tile *target_tile, const struct extra_type *target_extra)
struct act_prob action_prob_vs_extras(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct tile *target_tile, const struct extra_type *target_extra)
struct act_prob action_prob_self(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id)
struct act_prob action_prob_vs_units(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct tile *target_tile)
struct act_prob action_prob_vs_city(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct city *target_city)
bool action_id_exists(const action_id act_id)
struct act_prob action_prob_unit_vs_tgt(const struct civ_map *nmap, const struct action *paction, const struct unit *act_unit, const struct city *tgt_city, const struct unit *tgt_unit, const struct tile *tgt_tile, const struct extra_type *extra_tgt)
struct act_prob action_prob_vs_unit(const struct civ_map *nmap, const struct unit *actor_unit, const action_id act_id, const struct unit *target_unit)
#define action_id_univs_not_blocking(act_id, act_uni, tgt_uni)
#define action_by_result_iterate(_paction_, _result_)
static struct action * action_by_number(action_id act_id)
#define action_has_result(_act_, _res_)
#define action_id_get_role(act_id)
#define action_by_result_iterate_end
#define action_iterate_end
#define action_iterate(_act_)
#define action_id_get_target_kind(act_id)
#define action_id_has_result_safe(act_id, result)
void astr_free(struct astring *astr)
static const char * astr_str(const struct astring *astr) fc__attribute((nonnull(1)))
void audio_play_sound(const char *const tag, const char *const alt_tag)
struct extra_type * base_extra_get(const struct base_type *pbase)
struct base_type * get_base_by_gui_type(enum base_gui_type type, const struct unit *punit, const struct tile *ptile)
static bool is_enemy_city_tile(const struct tile *ptile, const struct player *pplayer)
void popup_city_dialog(struct city *pcity)
int client_player_number(void)
void send_turn_done(void)
enum client_states client_state(void)
bool can_client_issue_orders(void)
bool client_has_player(void)
bool is_server_busy(void)
bool can_client_change_view(void)
enum direction8 gui_to_map_dir(enum direction8 gui_dir)
void create_event(struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
bool can_units_do_connect(struct unit_list *punits, enum unit_activity activity, struct extra_type *tgt)
bool can_unit_attack_tile(const struct unit *punit, const struct action *paction, const struct tile *dest_tile)
double blink_turn_done_button(void)
void key_coastline_toggle(void)
void key_irrigation_toggle(void)
void request_toggle_huts(void)
void key_unit_sentry(void)
void request_toggle_city_outlines(void)
void request_unit_airlift(struct unit *punit, struct city *pcity)
void do_move_unit(struct unit *punit, struct unit *target_unit)
void request_toggle_resources(void)
void request_toggle_city_names(void)
void key_recall_previous_focus_unit(void)
void request_unit_non_action_move(struct unit *punit, struct tile *dest_tile)
void request_toggle_unit_stack_size(void)
void key_unit_pollution(void)
bool unit_is_in_focus(const struct unit *punit)
void key_city_output_toggle(void)
void request_toggle_focus_unit(void)
void request_toggle_city_output(void)
void request_unit_return(struct unit *punit)
void request_unit_fortify(struct unit *punit)
void key_unit_build_city(void)
void key_editor_recalculate_borders(void)
struct unit * request_unit_unload_all(struct unit *punit)
void key_roads_rails_toggle(void)
void request_unit_caravan_action(struct unit *punit, action_id action)
void action_selection_no_longer_in_progress(const int old_actor_id)
void request_toggle_roads_rails(void)
enum unit_orders goto_last_order
void request_units_wait(struct unit_list *punits)
void request_unit_wakeup(struct unit *punit)
struct unit * get_focus_unit_on_tile(const struct tile *ptile)
void key_focus_unit_toggle(void)
void request_toggle_map_grid(void)
void action_decision_request(struct unit *actor_unit)
void request_toggle_mines(void)
void set_units_in_combat(struct unit *pattacker, struct unit *pdefender)
int check_recursive_road_connect(struct tile *ptile, const struct extra_type *pextra, const struct unit *punit, const struct player *pplayer, int rec)
void key_unit_action_select(void)
void key_unit_auto_explore(void)
static int action_selection_in_progress_for
static void do_disband_alternative(void *p)
void key_cancel_action(void)
void request_toggle_city_buycost(void)
void key_unit_auto_settle(void)
void clear_hover_state(void)
void request_toggle_map_native(void)
void request_unit_patrol(void)
void key_unit_connect(enum unit_activity activity, struct extra_type *tgt)
void key_city_full_bar_toggle(void)
void request_unit_load(struct unit *pcargo, struct unit *ptrans, struct tile *ptile)
void key_bases_toggle(void)
void do_map_click(struct tile *ptile, enum quickselect_type qtype)
static void key_unit_extra(enum unit_activity act, enum extra_cause cause)
void key_map_native_toggle(void)
void request_toggle_map_borders(void)
void key_resources_toggle(void)
static struct unit * punit_attacking
void unit_focus_add(struct unit *punit)
void unit_focus_set(struct unit *punit)
static void do_unit_act_sel_vs(struct tile *ptile)
void request_unit_goto(enum unit_orders last_order, action_id act_id, int sub_tgt_id)
void do_unit_paradrop_to(struct unit *punit, struct tile *ptile)
bool should_ask_server_for_actions(const struct unit *punit)
struct extra_type * connect_tgt
void key_unit_paradrop(void)
static bool can_units_attack_at(struct unit_list *punits, const struct tile *ptile)
struct unit_list * get_units_in_focus(void)
void request_do_action(action_id action, int actor_id, int target_id, int sub_tgt, const char *name)
void request_unit_disband(struct unit *punit)
void request_toggle_irrigation(void)
static struct unit_list * current_focus
static struct unit_list * previous_focus
static void key_unit_gen_clean(enum unit_activity act, enum extra_rmcause rmcause)
void request_unit_autosettlers(const struct unit *punit)
void request_unit_pillage(struct unit *punit)
void request_center_focus_unit(void)
void unit_focus_urgent(struct unit *punit)
void key_unit_shields_toggle(void)
void key_city_productions_toggle(void)
bool can_unit_do_connect(struct unit *punit, enum unit_activity activity, struct extra_type *tgt)
void key_unit_build_wonder(void)
void key_unit_plant(void)
void key_unit_fortress(void)
void request_unit_change_homecity(struct unit *punit)
void request_toggle_fog_of_war(void)
void key_unit_pillage(void)
void request_unit_unload(struct unit *pcargo)
void key_editor_toggle_fogofwar(void)
static void client_disband_unit_data_destroy(void *p)
void request_unit_ssa_set(const struct unit *punit, enum server_side_agent agent)
static struct unit * find_best_focus_candidate(bool accept_current)
void request_action_details(action_id action, int actor_id, int target_id)
static struct unit * quickselect(struct tile *ptile, enum quickselect_type qtype)
enum unit_activity connect_activity
void request_toggle_units(void)
void request_new_unit_activity_targeted(struct unit *punit, enum unit_activity act, struct extra_type *tgt)
void update_unit_pix_label(struct unit_list *punitlist)
void key_unit_irrigate(void)
void request_unit_build_city(struct unit *punit)
void unit_change_battlegroup(struct unit *punit, int battlegroup)
static struct unit_list * urgent_focus_queue
void key_unit_unload_all(void)
void key_cities_toggle(void)
void key_unit_move(enum direction8 gui_dir)
void key_city_outlines_toggle(void)
void key_unit_homecity(void)
void request_unit_paradrop(struct unit_list *punits)
void set_hover_state(struct unit_list *punits, enum cursor_hover_state state, enum unit_activity activity, struct extra_type *tgt, int last_tgt, int last_sub_tgt, action_id action, enum unit_orders order)
static int disband_unit_alternatives[3]
void key_unit_patrol(void)
void request_toggle_city_full_bar(void)
void request_toggle_city_growth(void)
void key_unit_solid_bg_toggle(void)
void request_toggle_unit_solid_bg(void)
void key_terrain_toggle(void)
void request_unit_sentry(struct unit *punit)
void key_unit_wakeup_others(void)
static struct unit * punit_defending
static struct tile * find_a_focus_unit_tile_to_center_on(void)
enum cursor_hover_state hover_state
void key_unit_stack_size_toggle(void)
static void store_previous_focus(void)
void key_huts_toggle(void)
void key_fog_of_war_toggle(void)
void request_unit_connect(enum unit_activity activity, struct extra_type *tgt)
void clear_unit_orders(struct unit *punit)
void request_toggle_terrain(void)
void action_decision_clear_want(const int old_actor_id)
void key_units_toggle(void)
void do_unit_connect(struct tile *ptile, enum unit_activity activity, struct extra_type *tgt)
void unit_focus_remove(struct unit *punit)
void request_toggle_bases(void)
void do_unit_patrol_to(struct tile *ptile)
void key_unit_trade_route(void)
void request_toggle_coastline(void)
void key_unit_select_battlegroup(int battlegroup, bool append)
void key_map_grid_toggle(void)
void finish_city(struct tile *ptile, const char *name)
static struct unit * punit_moving
void key_pollution_toggle(void)
struct unit * head_of_units_in_focus(void)
static bool is_activity_on_tile(struct tile *ptile, enum unit_activity activity)
struct unit * find_visible_unit(struct tile *ptile)
static bool can_be_irrigated(const struct tile *ptile, const struct unit *punit)
void key_city_growth_toggle(void)
void key_unit_action_select_tgt(void)
void key_unit_fallout(void)
static struct unit_list * battlegroups[MAX_NUM_BATTLEGROUPS]
void key_city_buycost_toggle(void)
int get_num_units_in_focus(void)
void key_unit_transform(void)
void request_move_unit_direction(struct unit *punit, int dir)
static void current_focus_append(struct unit *punit)
static void current_focus_remove(struct unit *punit)
static struct tile * hover_tile
void key_city_trade_routes_toggle(void)
static void focus_units_changed(void)
void request_toggle_city_trade_routes(void)
void unit_focus_set_and_select(struct unit *punit)
void request_unit_convert(struct unit *punit)
void request_toggle_unit_shields(void)
void key_city_names_toggle(void)
void unit_register_battlegroup(struct unit *punit)
void request_unit_select(struct unit_list *punits, enum unit_select_type_mode seltype, enum unit_select_location_mode selloc)
void unit_focus_update(void)
void key_unit_airbase(void)
void control_mouse_cursor(struct tile *ptile)
void key_unit_convert(void)
void key_unit_clean(void)
void key_center_capital(void)
void wakeup_sentried_units(struct tile *ptile)
void request_toggle_cities(void)
void key_unit_fortify(void)
void key_editor_toggle(void)
void key_unit_assign_battlegroup(int battlegroup, bool append)
void request_unit_move_done(void)
void auto_center_on_focus_unit(void)
void key_unit_cultivate(void)
double blink_active_unit(void)
void unit_focus_advance(bool accept_current)
void request_unit_upgrade(struct unit *punit)
void control_unit_killed(struct unit *punit)
void request_toggle_city_productions(void)
void cancel_city(struct tile *ptile)
static void ask_server_for_actions(struct unit *punit)
void request_new_unit_activity(struct unit *punit, enum unit_activity act)
void request_toggle_pollution(void)
action_id goto_last_action
void key_mines_toggle(void)
void do_unit_goto(struct tile *ptile)
void action_selection_next_in_focus(const int old_actor_id)
static bool can_ask_server_for_actions(void)
void key_map_borders_toggle(void)
#define can_unit_do_activity_targeted_client(_punit_, _act_, _tgt_)
#define MAX_NUM_UNITS_BELOW
#define can_unit_do_activity_client(_punit_, _act_)
struct unit struct city struct unit * target_unit
struct unit struct city struct unit struct tile struct extra_type const struct act_prob *act_probs action_selection_no_longer_in_progress_gui_specific
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
struct unit struct city * target_city
int get_unit_bonus(const struct unit *punit, enum effect_type effect_type)
#define IDENTITY_NUMBER_ZERO
const struct ft_color ftc_client
bool is_player_phase(const struct player *pplayer, int phase)
struct unit * game_unit_by_number(int id)
void exit_goto_state(void)
bool goto_is_active(void)
struct pf_path * path_to_nearest_allied_city(struct unit *punit)
void send_patrol_route(void)
bool is_valid_goto_draw_line(struct tile *dest_tile)
bool goto_add_waypoint(void)
bool goto_pop_waypoint(void)
void send_connect_route(enum unit_activity activity, struct extra_type *tgt)
void goto_unit_killed(struct unit *punit)
void free_client_goto(void)
void enter_goto_state(struct unit_list *punits)
void send_goto_route(void)
bool is_valid_goto_destination(const struct tile *ptile)
void request_orders_cleared(struct unit *punit)
void send_goto_path(struct unit *punit, struct pf_path *path, struct unit_order *final_order)
int action_selection_actor_unit(void)
void action_selection_close(void)
void refresh_unit_city_dialogs(struct unit *punit)
void unit_select_dialog_popup(struct tile *ptile)
void popup_pillage_dialog(struct unit *punit, bv_extras extras)
void real_focus_units_changed(void)
void set_unit_icons_more_arrow(bool onoff)
void set_unit_icon(int idx, struct unit *punit)
void create_line_at_mouse_pos(void)
void update_turn_done_button(bool do_restore)
void put_cross_overlay_tile(struct tile *ptile)
void update_unit_info_label(struct unit_list *punits)
void update_mouse_cursor(enum cursor_type new_cursor_type)
bool request_transport(struct unit *cargo, struct tile *ptile)
enum cursor_type mouse_cursor_type
#define fc_assert_msg(condition, message,...)
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
#define log_error(message,...)
int get_direction_for_step(const struct civ_map *nmap, const struct tile *start_tile, const struct tile *end_tile)
bool is_tiles_adjacent(const struct tile *tile0, const struct tile *tile1)
bool same_pos(const struct tile *tile1, const struct tile *tile2)
struct tile * mapstep(const struct civ_map *nmap, const struct tile *ptile, enum direction8 dir)
void map_distance_vector(int *dx, int *dy, const struct tile *tile0, const struct tile *tile1)
#define iterate_outward(nmap, start_tile, max_dist, itr_tile)
#define iterate_outward_end
bool keyboardless_goto_button_down
void cancel_tile_hiliting(void)
bool keyboardless_goto_active
struct tile * keyboardless_goto_start_tile
void update_map_canvas_visible(void)
struct tile * get_center_tile_mapcanvas(void)
void move_unit_map_canvas(struct unit *punit, struct tile *src_tile, int dx, int dy)
void center_tile_mapcanvas(const struct tile *ptile)
void update_city_description(struct city *pcity)
void refresh_unit_mapcanvas(struct unit *punit, struct tile *ptile, bool full_refresh, bool write_to_screen)
bool tile_visible_and_not_on_border_mapcanvas(struct tile *ptile)
bool can_unit_exist_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
bool can_unit_survive_at_tile(const struct civ_map *nmap, const struct unit *punit, const struct tile *ptile)
const struct option_set * server_optset
bool option_bool_get(const struct option *poption)
struct client_options gui_options
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
void refresh_overview_canvas(void)
#define REQEST_PLAYER_INITIATED
int dsend_packet_unit_do_action(struct connection *pc, int actor_id16, int actor_id32, int target_id, int sub_tgt_id, const char *name, action_id action_type)
int dsend_packet_unit_sscs_set(struct connection *pc, int unit_id16, int unit_id32, enum unit_ss_data_type type, int value)
int send_packet_unit_orders(struct connection *pc, const struct packet_unit_orders *packet)
int send_packet_edit_recalculate_borders(struct connection *pc)
int dsend_packet_unit_get_actions(struct connection *pc, int actor_unit_id16, int actor_unit_id32, int target_unit_id16, int target_unit_id32, int target_tile_id, int target_extra_id, int request_kind)
int dsend_packet_unit_action_query(struct connection *pc, int actor_id16, int actor_id32, int target_id, action_id action_type, int request_kind)
int dsend_packet_unit_server_side_agent_set(struct connection *pc, int unit_id16, int unit_id32, enum server_side_agent agent)
int dsend_packet_unit_change_activity(struct connection *pc, int unit_id16, int unit_id32, enum unit_activity activity, int target)
int dsend_packet_city_name_suggestion_req(struct connection *pc, int unit_id16, int unit_id32)
int dsend_packet_edit_toggle_fogofwar(struct connection *pc, int player)
int dsend_packet_edit_mode(struct connection *pc, bool state)
const struct pf_position * pf_path_last_position(const struct pf_path *path)
void pf_path_destroy(struct pf_path *path)
struct unit * player_unit_by_number(const struct player *pplayer, int unit_id)
struct city * player_primary_capital(const struct player *pplayer)
bool can_player_see_units_in_city(const struct player *pplayer, const struct city *pcity)
bool can_player_see_city_internals(const struct player *pplayer, const struct city *pcity)
#define players_iterate_alive_end
#define players_iterate_alive(_pplayer)
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)
bool can_build_road(const struct civ_map *nmap, struct road_type *proad, const struct unit *punit, const struct tile *ptile)
bool player_can_build_road(const struct civ_map *nmap, const struct road_type *proad, const struct player *pplayer, const struct tile *ptile)
enum capital_type capital
struct packet_game_info info
bool enable_cursor_changes
bool draw_city_productions
int smooth_move_unit_msec
bool draw_fortress_airbase
bool draw_unit_stack_size
bool auto_center_on_automated
bool draw_city_trade_routes
bool unit_selection_clears_orders
bool solid_color_behind_units
bool popup_last_move_to_allied
struct connection::@57::@62 client
struct unit_order orders[MAX_LEN_ROUTE]
enum unit_activity activity
enum action_decision action_decision_want
enum unit_activity activity
struct unit::@80::@82 client
struct act_prob * act_prob_cache
struct tile * action_decision_tile
enum unit_focus_status focus_status
enum server_side_agent ssa_controller
struct extra_type * get_preferred_pillage(bv_extras extras)
int terrain_extra_build_time(const struct terrain *pterrain, enum unit_activity activity, const struct extra_type *tgt)
void tile_add_extra(struct tile *ptile, const struct extra_type *pextra)
void tile_virtual_destroy(struct tile *vtile)
bool tile_has_road(const struct tile *ptile, const struct road_type *proad)
struct tile * tile_virtual_new(const struct tile *ptile)
struct city * tile_city(const struct tile *ptile)
#define tile_hash_iterate(hash, ptile)
#define tile_terrain(_tile)
#define tile_hash_iterate_end
#define tile_continent(_tile)
#define tile_has_extra(ptile, pextra)
double get_focus_unit_toggle_timeout(const struct tileset *t)
void toggle_focus_unit_state(struct tileset *t)
void focus_unit_in_combat(struct tileset *t)
void timer_start(struct timer *t)
double timer_read_seconds(struct timer *t)
struct timer * timer_renew(struct timer *t, enum timer_timetype type, enum timer_use use)
int get_transporter_occupancy(const struct unit *ptrans)
bool is_attack_unit(const struct unit *punit)
struct unit * unit_transport_get(const struct unit *pcargo)
bool is_military_unit(const struct unit *punit)
bool could_unit_load(const struct unit *pcargo, const struct unit *ptrans)
bool can_unit_do_autosettlers(const struct unit *punit)
bool unit_can_do_action(const struct unit *punit, const action_id act_id)
int get_transporter_capacity(const struct unit *punit)
bool can_unit_paradrop(const struct civ_map *nmap, const struct unit *punit)
void unit_tile_set(struct unit *punit, struct tile *ptile)
bool unit_transported(const struct unit *pcargo)
bool can_unit_unload(const struct unit *pcargo, const struct unit *ptrans)
bool unit_has_orders(const struct unit *punit)
struct unit * transporter_for_unit(const struct unit *pcargo)
#define MAX_NUM_BATTLEGROUPS
static bool is_non_allied_unit_tile(const struct tile *ptile, const struct player *pplayer)
#define unit_list_iterate(unitlist, punit)
#define unit_list_iterate_safe(unitlist, _unit)
#define unit_list_iterate_end
#define unit_list_iterate_safe_end
const struct unit_type * unit_type_get(const struct unit *punit)
const char * unit_name_translation(const struct unit *punit)
enum unit_move_type utype_move_type(const struct unit_type *punittype)
bool utype_may_act_at_all(const struct unit_type *putype)
struct unit_class * unit_class_get(const struct unit *punit)
bool unit_has_type_flag(const struct unit *punit, enum unit_type_flag_id flag)
bool role_units_translations(struct astring *astr, int flag, bool alts)
void update_queue_connect_processing_finished_full(int request_id, uq_callback_t callback, void *data, uq_free_fn_t free_data_func)