373 "Unit %d started action selection before unit %d was done",
949 if (pplayer->phase_done) {
1060 "Decision taken for %d but selection is for %d.",
1161 _(
"Only %s can do %s."),
1169 _(
"%s can't do %s."),
1198 const struct tile *ptile)
1258 }
else if (
NULL != pcity
1374 }
else if (pplayer !=
NULL) {
1454 return build_time >= 0;
1518 _(
"Only transporter units can be unloaded."));
1608#define SPECHASH_TAG unit_type
1609#define SPECHASH_IKEY_TYPE struct unit_type *
1610#define SPECHASH_IDATA_TYPE void *
1613#define SPECHASH_TAG continent
1614#define SPECHASH_INT_KEY_TYPE
1615#define SPECHASH_IDATA_TYPE void *
1625 const struct player *pplayer;
1626 const struct tile *ptile;
1739 data->
actor = actor_id;
1740 data->
target = target_id;
1802 actor_id, target_id,
action,
1837 struct tile *dest_tile)
1849 memset(&p, 0,
sizeof(p));
1882 struct tile *dest_tile;
1903 memset(&p, 0,
sizeof(p));
1974 int last_request_id_used;
1990 if (data->
alt == -1) {
1994 _(
"Unable to get rid of %s."),
2004 next->
alt = data->
alt - 1;
2147 _(
"Only settler units can be put into auto mode."));
2267 _(
"Click on a tile to paradrop to it."));
2274 _(
"Only paratrooper units can do this."));
2305 _(
"Click on a tile to teleport to it."));
2312 _(
"Only teleporting units can do this."));
2388 if (target !=
NULL) {
2957 }
else if (
NULL != pcity
3139 _(
"Didn't find a route to the destination!"));
3232 _(
"Didn't find a route to the destination!"));
3249 _(
"Didn't find a route to the destination!"));
3305 _(
"Oh my! You seem to have no capital!"));
3439 _(
"Click on a tile to do %s against it."),
3453 _(
"Click on a tile to act against it. "
3454 "Press 'd' again to act against own tile."));
3832 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_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_stack(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_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, const char *const alt_tag2)
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)
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 request_unit_caravan_action(struct unit *punit, action_id action)
void action_selection_no_longer_in_progress(const int old_actor_id)
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 void request_unit_teleport(struct unit_list *punits)
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
void request_unit_autosettlers(const struct unit *punit)
void request_unit_pillage(struct unit *punit)
void key_unit_teleport(void)
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 action_confirmation(struct act_confirmation_data *data, bool confirm)
void key_terrain_toggle(void)
void key_paths_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)
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_paths(void)
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)
static bool action_requires_confirmation(action_id act, char *buf, size_t bufsize)
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)
static void do_unit_teleport_to(struct unit *punit, struct tile *ptile)
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 request_action_confirmation(const char *expl, struct act_confirmation_data *data)
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_change_activity(struct connection *pc, int unit_id, enum unit_activity activity, int target)
int dsend_packet_unit_do_action(struct connection *pc, int actor_id, int target_id, int sub_tgt_id, const char *name, action_id action_type)
int send_packet_unit_orders(struct connection *pc, const struct packet_unit_orders *packet)
int dsend_packet_unit_get_actions(struct connection *pc, int actor_unit_id, int target_unit_id, int target_tile_id, int target_extra_id, int request_kind)
int dsend_packet_unit_server_side_agent_set(struct connection *pc, int unit_id, enum server_side_agent agent)
int send_packet_edit_recalculate_borders(struct connection *pc)
int dsend_packet_unit_action_query(struct connection *pc, int actor_id, int target_id, action_id action_type, int request_kind)
int dsend_packet_city_name_suggestion_req(struct connection *pc, int unit_id)
int dsend_packet_edit_toggle_fogofwar(struct connection *pc, int player)
int dsend_packet_unit_sscs_set(struct connection *pc, int unit_id, enum unit_ss_data_type type, int value)
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::@58::@63 client
struct unit_order orders[MAX_LEN_ROUTE]
enum unit_activity activity
enum unit_activity activity
enum action_decision action_decision_want
enum unit_activity activity
struct unit::@81::@83 client
struct tile * action_decision_tile
enum unit_focus_status focus_status
enum server_side_agent ssa_controller
int fc_snprintf(char *str, size_t n, const char *format,...)
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, const char *name)
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 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)
bool can_unit_teleport(const struct civ_map *nmap, const struct unit *punit)
int get_transporter_capacity(const struct unit *punit)
bool can_unit_paradrop(const struct civ_map *nmap, const struct unit *punit)
bool is_special_unit(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)