120 _(
"You don't know how to build %s!"),
130 ptile, E_CITY_PRODUCTION_CHANGED,
147 _(
"Clipboard is empty."));
299 dsend_packet_city_make_specialist(&
client.
conn, pcity->
id,
bool can_city_build_now(const struct city *pcity, const struct universal *target)
Returns whether city can immediately build given target, unit or improvement.
struct player * city_owner(const struct city *pcity)
Return the owner of the city.
struct tile * city_tile(const struct city *pcity)
Return the tile location of the city.
bool city_base_to_city_map(int *city_map_x, int *city_map_y, const struct city *const pcity, const struct tile *map_tile)
Finds the city map coordinate for a given map position and a city.
bool city_can_work_tile(const struct city *pcity, const struct tile *ptile)
Returns TRUE when a tile is available to be worked, or the city itself is currently working the tile ...
void center_on_tile(tile *tile, bool animate=true)
Centers the view on a tile.
auto turn_done()
Retrieves the Turn Done button.
::minimap_panel * minimap_panel
bool waiting_for_end_turn
bool is_server_busy()
Returns if server is considered busy at the moment.
bool can_client_issue_orders()
Returns TRUE iff the client can issue orders (such as giving unit commands).
void send_turn_done()
Send information about player having finished his/her turn to server.
bool can_client_change_view()
Return TRUE if the client can change the view; i.e.
void create_event(struct tile *ptile, enum event_type event, const struct ft_color color, const char *format,...)
Creates a struct packet_generic_message packet and injects it via handle_chat_msg.
std::vector< unit * > & get_units_in_focus()
Returns list of units currently in focus.
enum unit_orders goto_last_order
unit * find_visible_unit(const ::tile *ptile)
Return a pointer to a visible unit, if there is one.
void do_map_click(struct tile *ptile, enum quickselect_type qtype)
Handles everything when the user clicked a tile.
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).
struct extra_type * connect_tgt
enum unit_activity connect_activity
int get_num_units_in_focus()
Return the number of units currently in focus (0 or more).
enum cursor_hover_state hover_state
void set_hover_state(const std::vector< unit * > &units, 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)
Enter the given hover state.
void clear_hover_state()
Clear current hover state (go to HOVER_NONE).
void wakeup_sentried_units(struct tile *ptile)
Wakes all owned sentried units on tile.
action_id goto_last_action
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.
const struct ft_color ftc_client
bool is_player_phase(const struct player *pplayer, int phase)
Return TRUE if it is this player's phase.
bool is_valid_goto_draw_line(struct tile *dest_tile)
Puts a line to dest_tile on the map according to the current goto_map.
bool cma_is_city_under_agent(const struct city *pcity, struct cm_parameter *parameter)
Check whether city is under governor control, and fill parameter if it is.
#define fc_assert_ret(condition)
bool same_pos(const struct tile *tile1, const struct tile *tile2)
Are (x1,y1) and (x2,y2) really the same when adjusted? This function might be necessary ALOT of place...
void update_line(int canvas_x, int canvas_y)
Update the goto/patrol line to the given map canvas location.
void maybe_activate_keyboardless_goto(int canvas_x, int canvas_y)
The goto hover state is only activated when the mouse pointer moves beyond the tile where the button ...
void adjust_workers_button_pressed(int canvas_x, int canvas_y)
Adjust the position of city workers from the mapview.
void release_goto_button(int canvas_x, int canvas_y)
Goto button has been released.
bool get_turn_done_button_state()
Return TRUE iff the turn done button should be enabled.
bool tiles_hilited_cities
struct universal clipboard
void recenter_button_pressed(int canvas_x, int canvas_y)
Recenter the map on the canvas location, on user request.
void update_turn_done_button_state()
Update the turn done button state.
void action_button_pressed(int canvas_x, int canvas_y, enum quickselect_type qtype)
Do some appropriate action when the "main" mouse button (usually left-click) is pressed.
void wakeup_button_pressed(int canvas_x, int canvas_y)
Wakeup sentried units on the tile of the specified location.
struct city * city_workers_display
bool keyboardless_goto_button_down
void key_city_overlay(int canvas_x, int canvas_y)
The user pressed the overlay-city button (t) while the mouse was at the given canvas position.
bool can_end_turn()
Return TRUE iff client can end turn.
void cancel_selection_rectangle()
Redraws the selection rectangle after a map flush.
void upgrade_canvas_clipboard()
A newer technology may be available for units.
bool keyboardless_goto_active
void clipboard_paste_production(struct city *pcity)
If City tiles are hilited, paste into all those cities.
static void clipboard_send_production_packet(struct city *pcity)
Send request to build production in clipboard to server.
bool clipboard_copy_production(struct tile *ptile)
Shift-Left-Click on owned city or any visible unit to copy.
struct tile * keyboardless_goto_start_tile
void update_turn_done_button(bool do_restore)
If do_restore is false it should change the turn button style (to draw the user's attention to it).
void draw_selection_rectangle(int canvas_x, int canvas_y, int w, int h)
Area Selection.
void update_unit_info_label(const std::vector< unit * > &unit_list)
Update the information label which gives info on the current unit and the tile under the current unit...
const struct option_set * server_optset
client_options * gui_options
struct option * optset_option_by_name(const struct option_set *poptset, const char *name)
Returns the option corresponding of the name in this option set.
bool option_bool_get(const struct option *poption)
Returns the current value of this boolean option.
pageGame * queen()
Return game instandce.
const char * universal_name_translation(const struct universal *psource, char *buf, size_t bufsz)
Make user-friendly text for the source.
bool are_universals_equal(const struct universal *psource1, const struct universal *psource2)
Return TRUE iff the two sources are equivalent.
int universal_number(const struct universal *source)
Return the universal number of the constituent.
struct universal production
struct packet_game_info info
The base class for options.
struct city * tile_city(const struct tile *ptile)
Return the city on this tile (or nullptr), checking for city center.
#define tile_worked(_tile)
const struct unit_type * utype
const struct impr_type * building
const struct unit_type * unit_type_get(const struct unit *punit)
Return the unit type for this unit.
const struct unit_type * can_upgrade_unittype(const struct player *pplayer, const struct unit_type *punittype)
Return whether this player can upgrade this unit type (to any other unit type).
bool can_player_build_unit_direct(const struct player *p, const struct unit_type *punittype)
Whether player can build given unit somewhere, ignoring whether unit is obsolete and assuming the pla...
const char * unit_name_translation(const struct unit *punit)
Return the (translated) name of the unit.
struct tile * canvas_pos_to_tile(float canvas_x, float canvas_y)
Finds the tile corresponding to pixel coordinates.
struct city * find_city_or_settler_near_tile(const struct tile *ptile, struct unit **punit)
Find the "best" city/settlers to associate with the selected tile.
void toggle_city_color(struct city *pcity)
Toggle the city color.
void toggle_unit_color(struct unit *punit)
Toggle the unit color.
struct tile * canvas_pos_to_nearest_tile(float canvas_x, float canvas_y)
Finds the tile corresponding to pixel coordinates.