59 const struct unit *punit,
60 const struct player *pplayer,
int rec);
80 struct tile *dest_tile);
84 enum unit_activity act,
90 enum server_side_agent agent);
127 int sub_tgt,
const char *
name);
void request_toggle_city_productions()
Toggle display of city productions.
void request_unit_airlift(struct unit *punit, struct city *pcity)
Send unit airlift request to server.
void do_move_unit(struct unit *punit, struct unit *target_unit)
Called to have the client move a unit from one location to another, updating the graphics if necessar...
void request_unit_non_action_move(struct unit *punit, struct tile *dest_tile)
Order a unit to move to a neighboring tile without performing an action.
void request_toggle_city_output()
Toggle display of worker output of cities on the map.
void key_unit_plant()
Handle user 'plant' input.
bool unit_is_in_focus(const struct unit *punit)
Return TRUE iff this unit is in focus.
std::vector< unit * > & get_units_in_focus()
Returns list of units currently in focus.
void key_unit_paradrop()
Handle user 'paradrop' input.
void key_unit_goto()
Handle user 'unit goto' input.
void request_units_wait(const std::vector< unit * > &units)
Set units in list to waiting focus and advance focus.
void key_unit_homecity()
Handle user 'change homecity' input.
void request_unit_fortify(struct unit *punit)
Try to fortify unit.
void request_unit_caravan_action(struct unit *punit, action_id action)
Send request to do caravan action - establishing traderoute or helping in wonder building - to server...
void action_selection_no_longer_in_progress(const int old_actor_id)
The action selection process is no longer in progres for the specified unit.
enum unit_orders goto_last_order
void request_unit_wakeup(struct unit *punit)
(RP:) un-sentry all my own sentried units on punit's tile
void key_city_names_toggle()
Handle user 'toggle city names display' input.
void action_decision_request(struct unit *actor_unit)
Request that the player makes a decision for the specified unit.
void key_unit_fallout()
Handle user 'clean fallout' input.
unit_select_location_mode
void key_unit_mine()
Handle user 'build mine' input.
void key_unit_done()
Handle user 'unit done' input.
void set_units_in_combat(struct unit *pattacker, struct unit *pdefender)
Adjusts way combatants are displayed suitable for combat.
int check_recursive_road_connect(struct tile *ptile, const struct extra_type *pextra, const struct unit *punit, const struct player *pplayer, int rec)
Fill orders to build recursive roads.
void request_toggle_city_trade_routes()
Toggle display of city trade routes.
void request_toggle_map_grid()
Toggle display of grid lines on the map.
void key_unit_wait()
Handle user 'wait' input.
void unit_focus_update()
If there is no unit currently in focus, or if the current unit in focus should not be in focus,...
unit * find_visible_unit(const ::tile *ptile)
Return a pointer to a visible unit, if there is one.
void key_unit_connect(enum unit_activity activity, struct extra_type *tgt)
Handle user pressing key for 'Connect' command.
void do_map_click(struct tile *ptile, enum quickselect_type qtype)
Handles everything when the user clicked a tile.
void key_unit_auto_settle()
Call to request (from the server) that the focus unit is put into autosettler mode.
void control_init()
Called only by client_game_init() in client/client_main.c.
void key_unit_irrigate()
Handle user 'irrigate' input.
void unit_focus_add(struct unit *punit)
Adds this unit to the list of units in focus.
void key_city_trade_routes_toggle()
Handle client request to toggle drawing of trade route information by the city name for cities visibl...
void key_unit_wakeup_others()
Handle user 'wakeup others' input.
void unit_focus_set(struct unit *punit)
Sets the focus unit directly.
struct unit * request_unit_unload_all(struct unit *punit)
Returns one of the unit of the transporter which can have focus next.
void request_unit_goto(enum unit_orders last_order, action_id act_id, int sub_tgt_id)
Do a goto with an order at the end (or ORDER_LAST).
void key_center_capital()
Center the mapview on the player's named capital, or print a failure message.
void do_unit_paradrop_to(struct unit *punit, struct tile *ptile)
Paradrop to a location.
bool should_ask_server_for_actions(const struct unit *punit)
Returns TRUE iff the client should ask the server about what actions a unit can perform.
struct extra_type * connect_tgt
void request_do_action(action_id action, int actor_id, int target_id, int sub_tgt, const char *name)
Request an actor unit to do a specific action.
void key_map_native_toggle()
Toggle native tiles on the mapview on/off based on a keypress.
void request_unit_disband(struct unit *punit)
Send request to disband unit to server.
void request_unit_autosettlers(const struct unit *punit)
Call to request (from the server) that the settler unit is put into autosettler mode.
void request_unit_pillage(struct unit *punit)
Send pillage request to server.
void unit_focus_urgent(struct unit *punit)
Store a priority focus unit.
bool can_unit_do_connect(struct unit *punit, enum unit_activity activity, struct extra_type *tgt)
Return whether the unit can connect with given activity (or with any activity if activity arg is set ...
void request_unit_change_homecity(struct unit *punit)
Send request to change unit homecity to server.
void request_unit_patrol()
Either start new patrol route planning, or add waypoint to current one.
void key_unit_transform()
Handle user 'transform unit' input.
void request_unit_load(struct unit *pcargo, struct unit *ptransporter, struct tile *ptile)
Send a request to the server that the cargo be loaded into the transporter.
void request_unit_move_done()
Set focus units to FOCUS_DONE state.
void request_toggle_map_native()
Toggle display of native tiles on the map.
void key_unit_unload_all()
Handle user 'unload all' input.
void request_unit_unload(struct unit *pcargo)
Send a request to the server that the cargo be unloaded from its current transporter.
void key_unit_sentry()
Handle user 'sentry' input.
void request_unit_ssa_set(const struct unit *punit, enum server_side_agent agent)
Call to request (from the server) that the unit is put under the control of the specified server side...
void request_action_details(action_id action, int actor_id, int target_id)
Request data for follow up questions about an action the unit can perform.
void request_unit_paradrop(const std::vector< unit * > &units)
Have the player select what tile to paradrop to.
enum unit_activity connect_activity
void request_toggle_city_growth()
Toggle display of city growth (turns-to-grow)
void request_new_unit_activity_targeted(struct unit *punit, enum unit_activity act, struct extra_type *tgt)
Send request for unit activity changing to server.
void key_city_productions_toggle()
Handle user 'toggle city production display' input.
void set_auto_center_enabled(bool enabled)
Allows disabling automatic map recentering.
void request_unit_build_city(struct unit *punit)
Player pressed 'b' or otherwise instructed unit to build or add to city.
void unit_change_battlegroup(struct unit *punit, int battlegroup)
Change the battlegroup for this unit.
void key_unit_auto_explore()
Handle user 'autoexplore' input.
void key_map_grid_toggle()
Handle user 'toggle map grid' input.
void key_cancel_action()
The 'Escape' key.
void key_city_buycost_toggle()
Toggles the showing of the buy cost of the current production in the city descriptions.
void key_unit_convert()
Unit convert key pressed or respective menu entry selected.
void control_free()
Called only by client_game_free() in client/client_main.c.
void key_unit_move(enum direction8 gui_dir)
Move the focus unit in the given direction.
void request_unit_select(const std::vector< unit * > &punits, enum unit_select_type_mode seltype, enum unit_select_location_mode selloc)
Select all units based on the given list of units and the selection modes.
void key_unit_action_select()
Handle user 'Do...' input.
int get_num_units_in_focus()
Return the number of units currently in focus (0 or more).
void key_recall_previous_focus_unit()
Recall the previous focus unit(s).
void request_center_focus_unit()
Center to focus unit.
void key_unit_patrol()
Handle user 'patrol' input.
void key_city_output_toggle()
Toggle drawing of city output produced by workers of the city.
int blink_turn_done_button()
Blink the turn done button (if necessary).
void request_unit_sentry(struct unit *punit)
Try to sentry unit.
void key_unit_fortify()
Handle user 'fortify' input.
enum cursor_hover_state hover_state
void request_unit_connect(enum unit_activity activity, struct extra_type *tgt)
Prompt player for entering destination point for unit connect (e.g.
void clear_unit_orders(struct unit *punit)
Clear all orders for the given unit.
void key_unit_cultivate()
Handle user 'cultivate' input.
void action_decision_clear_want(const int old_actor_id)
Have the server record that a decision no longer is wanted for the specified unit.
void do_unit_connect(struct tile *ptile, enum unit_activity activity, struct extra_type *tgt)
"Connect" to the given location.
struct unit * get_focus_unit_on_tile(const struct tile *ptile)
Return TRUE iff a unit on this tile is in focus.
void key_end_turn()
Handle user 'end turn' input.
void do_unit_patrol_to(struct tile *ptile)
Patrol to a location.
void request_toggle_city_buycost()
Toggle display of city buycost.
void finish_city(struct tile *ptile, const char *name)
All units ready to build city to the tile should now proceed.
void key_city_outlines_toggle()
Toggle drawing of city outlines.
void unit_focus_advance()
This function may be called from packhand.c, via unit_focus_update(), as a result of packets indicati...
void key_unit_action_select_tgt()
Have the user select what action the unit(s) in focus should perform to the targets at the tile the u...
void request_move_unit_direction(struct unit *punit, int dir)
This function is called whenever the player pressed an arrow key.
void request_toggle_city_outlines()
Toggle display of city outlines on the map.
void unit_focus_set_and_select(struct unit *punit)
The only difference is that here we draw the "cross".
void request_unit_convert(struct unit *punit)
Sends unit convert packet.
void clear_hover_state()
Clear current hover state (go to HOVER_NONE).
void unit_register_battlegroup(struct unit *punit)
Call this on new units to enter them in the battlegroup lists.
void request_units_return()
Return-and-recover for a particular unit.
void control_mouse_cursor(struct tile *ptile)
Determines which mouse cursor should be used, according to hover_state, and the information gathered ...
void set_hover_state(const std::vector< unit * > &units, enum cursor_hover_state state, enum unit_activity connect_activity, struct extra_type *tgt, int last_tgt, int goto_last_sub_tgt, action_id goto_last_action, enum unit_orders goto_last_order)
Enter the given hover state.
void request_toggle_map_borders()
Toggle display of national borders on the map.
void wakeup_sentried_units(struct tile *ptile)
Wakes all owned sentried units on tile.
void auto_center_on_focus_unit()
Center on the focus unit, if off-screen and auto_center_on_unit is true.
void key_unit_pillage()
Handle user 'pillage' input.
void key_unit_fortress()
Handle user 'build base of class fortress' input.
void request_unit_upgrade(struct unit *punit)
Send request to upgrade unit to server.
void control_unit_killed(struct unit *punit)
Called when a unit is killed; this removes it from the control lists.
void request_toggle_city_names()
Toggle display of city names.
void cancel_city(struct tile *ptile)
Do not build city after all.
struct unit * head_of_units_in_focus()
Return head of focus units list.
void request_new_unit_activity(struct unit *punit, enum unit_activity act)
Send request for unit activity changing to server.
action_id goto_last_action
void key_map_borders_toggle()
Toggle map borders on the mapview on/off based on a keypress.
void do_unit_goto(struct tile *ptile)
Finish the goto mode and let the units stored in goto_map_list move to a given location.
void key_city_growth_toggle()
Toggles the "show city growth turns" option by passing off the request to another function....
void action_selection_next_in_focus(const int old_actor_id)
Move on to the next unit in focus that needs an action decision.
void key_unit_airbase()
Handle user 'build base of class airbase' input.
int blink_active_unit()
Blink the active unit (if necessary).
enum unit_activity activity