Freeciv-3.3
|
#include "fc_types.h"
#include "featured_text.h"
#include "events.h"
#include "unittype.h"
#include "unitlist.h"
Go to the source code of this file.
Data Structures | |
struct | item |
Macros | |
#define | cid_production cid_decode |
#define | MAX_NUM_PRODUCTION_TARGETS (U_LAST + B_LAST) |
Typedefs | |
typedef int | cid |
typedef bool(* | TestCityFunc) (const struct city *, const struct universal *) |
Enumerations | |
enum | unit_bg_color_type { UNIT_BG_HP_LOSS , UNIT_BG_LAND , UNIT_BG_SEA , UNIT_BG_AMPHIBIOUS , UNIT_BG_FLYING } |
#define cid_production cid_decode |
For each selected city, buy the current production. The selected cities are sorted so production is bought in the cities with lowest cost first.
Definition at line 1317 of file climisc.c.
Referenced by key_press_map_canvas(), and key_press_map_canvas().
A TestCityFunc wrapper for can_city_build_now()
Definition at line 593 of file climisc.c.
Referenced by create_change_menu(), create_select_menu(), city_widget::display_list_menu(), city_widget::gen_select_labels(), popup_change_menu(), popup_first_menu(), popup_last_menu(), popup_next_menu(), popup_next_to_last_menu(), and popup_select_menu().
bool can_units_do_connect | ( | struct unit_list * | punits, |
enum unit_activity | activity, | ||
struct extra_type * | tgt | ||
) |
Returns TRUE if any of the units can do the connect activity.
Definition at line 1242 of file climisc.c.
Referenced by mr_menu::menus_sensitive(), real_menus_update(), and request_unit_connect().
Find something sensible to display. This is used to overwrite the intro gfx.
Definition at line 430 of file climisc.c.
Referenced by real_resize_window_callback(), real_set_client_page(), set_client_state(), and fc_client::switch_page().
Decode the CID into a city_production structure.
Definition at line 526 of file climisc.c.
Referenced by add_target_to_production(), add_target_to_worklist(), city_dialog::change_production(), collect_currently_building_targets(), collect_production_targets(), eco_report::disband_units(), city_widget::display_list_menu(), economy_report_command_callback(), economy_report_selection_callback(), get_target_help_data(), help_callback(), impr_or_unit_iterate(), select_impr_or_unit_callback(), select_impr_or_unit_callback(), eco_report::selection_changed(), eco_report::sell_buildings(), eco_report::sell_redundant(), swap_item_down_from_worklist(), wl_help_from_iter(), worklist_first_impr_or_unit_iterate(), worklist_last_impr_or_unit_iterate(), worklist_next_impr_or_unit_iterate(), and worklist_next_to_last_impr_or_unit_iterate().
Encode a CID for the target production.
Definition at line 483 of file climisc.c.
Referenced by add_target_to_production(), add_target_to_worklist(), append_impr_or_unit_to_menu(), append_impr_or_unit_to_menu_item(), city_dialog::change_production(), cid_encode_building(), cid_encode_from_city(), cid_encode_unit(), city_dialog_update_building(), city_widget::gen_production_labels(), menu_item_callback(), menu_item_callback(), popup_worklist_editor(), refresh_worklist(), select_impr_or_unit_callback(), and select_impr_or_unit_callback().
Encode a CID for the target building.
Definition at line 505 of file climisc.c.
Referenced by add_global_worklist(), economy_report_update(), popup_worklist_editor(), and eco_report::update_report().
Encode a CID for the target city's production.
Definition at line 518 of file climisc.c.
Referenced by collect_currently_building_targets().
Encode a CID for the target unit type.
Definition at line 493 of file climisc.c.
Referenced by add_global_worklist(), economy_report_update(), popup_worklist_editor(), and eco_report::update_report().
A TestCityFunc to tell whether the item is a building and is present.
Definition at line 583 of file climisc.c.
Referenced by create_select_menu(), city_widget::display_list_menu(), city_widget::gen_select_labels(), and popup_select_menu().
Return TRUE if the city has present at least one unit of the given production type (returns FALSE if the production is a building).
Definition at line 564 of file climisc.c.
Referenced by create_select_menu(), city_widget::display_list_menu(), city_widget::gen_select_labels(), and popup_select_menu().
Return TRUE if the city supports at least one unit of the given production type (returns FALSE if the production is a building).
Definition at line 545 of file climisc.c.
Referenced by create_select_menu(), city_widget::display_list_menu(), city_widget::gen_select_labels(), and popup_select_menu().
Called when the "Buy" button is pressed in the city report for every selected city. Checks for coinage and sufficient funds or request the purchase if everything is ok.
Definition at line 1155 of file climisc.c.
Referenced by city_widget::buy(), and buy_iterate().
Return the sprite for the global-cooling indicator.
Definition at line 394 of file climisc.c.
Referenced by setup_widgets(), show_game_page(), fc_sidewidget::update_final_pixmap(), fc_client::update_info_label(), and update_info_label().
struct nation_set * client_current_nation_set | ( | void | ) |
Returns the nation set in use.
Definition at line 1492 of file climisc.c.
Referenced by client_nation_is_in_current_set().
Copy a string that describes the given clause into the return buffer.
Definition at line 241 of file climisc.c.
Referenced by update_clauses_list(), update_diplomacy_dialog(), and diplo_wdg::update_wdg().
Return the sprite for the government indicator.
Definition at line 412 of file climisc.c.
Referenced by popup_unitinfo_window(), fc_sidewidget::resize_pixmap(), setup_widgets(), fc_sidewidget::update_final_pixmap(), fc_client::update_info_label(), and update_info_label().
bool client_nation_is_in_current_set | ( | const struct nation_type * | pnation | ) |
Returns Whether 'pnation' is in the current nation set.
Mostly a client stub.
Definition at line 1509 of file climisc.c.
Referenced by extviewer_refresh_widgets(), and show_help_for_nation().
Initialize a player on the client side.
Definition at line 1373 of file climisc.c.
Referenced by handle_player_info().
Reset the private maps of all players.
Definition at line 1384 of file climisc.c.
Referenced by handle_map_info().
Remove city, client end version.
Definition at line 134 of file climisc.c.
Referenced by handle_city_info(), handle_city_remove(), and handle_city_short_info().
Remove unit, client end version
Definition at line 72 of file climisc.c.
Referenced by handle_unit_remove().
Return the sprite for the research indicator.
Definition at line 354 of file climisc.c.
Referenced by popup_unitinfo_window(), setup_widgets(), fc_sidewidget::update_final_pixmap(), fc_client::update_info_label(), and update_info_label().
Initialize the action probability cache. Shouldn't be kept around permanently. Its data is quickly outdated.
Definition at line 1259 of file climisc.c.
Referenced by act_sel_done_primary(), diplomat_queue_handle_primary(), diplomat_queue_handle_primary(), and popup_action_selection().
Return the sprite for the global-warming indicator.
Definition at line 377 of file climisc.c.
Referenced by setup_widgets(), show_game_page(), fc_sidewidget::update_final_pixmap(), fc_client::update_info_label(), and update_info_label().
Collect the cids of all improvements which are built in the given city.
Definition at line 913 of file climisc.c.
Referenced by city_dialog_update_improvement_list(), and city_dialog::update_improvements().
int collect_eventually_buildable_targets | ( | struct universal * | targets, |
struct city * | pcity, | ||
bool | advanced_tech | ||
) |
Collect the cids of all targets which can be build by this city or in general.
Definition at line 819 of file climisc.c.
Referenced by city_dialog::change_production(), city_dialog_update_building(), city_production_model::populate(), and refresh_worklist().
int collect_production_targets | ( | struct universal * | targets, |
struct city ** | selected_cities, | ||
int | num_selected_cities, | ||
bool | append_units, | ||
bool | append_wonders, | ||
bool | change_prod, | ||
TestCityFunc | test_func | ||
) |
Return possible production targets for the current player's cities.
FIXME: this should probably take a pplayer argument.
Definition at line 700 of file climisc.c.
Referenced by append_impr_or_unit_to_menu(), append_impr_or_unit_to_menu_item(), and city_widget::gen_production_labels().
Switch between tax/sci/lux at given slot.
Definition at line 1194 of file climisc.c.
Referenced by reverse_taxrates_callback(), taxrates_callback(), and taxrates_callback().
void create_event | ( | struct tile * | ptile, |
enum event_type | event, | ||
const struct ft_color | color, | ||
const char * | format, | ||
... | |||
) |
Return a string indicating one nation's embassy status with another
Definition at line 194 of file climisc.c.
Referenced by col_embassy().
Find city nearest to given unit and optionally return squared city distance Parameter sq_dist may be NULL. Returns NULL only if no city is known. Favors punit owner's cities over other cities if equally distant.
Definition at line 1119 of file climisc.c.
Referenced by create_present_supported_units_widget_list(), and unit_description().
Return a string indicating one nation's shaed vision status with another
Definition at line 222 of file climisc.c.
Referenced by col_vision().
Return global warming chance and rate of change, scaled to max.
Definition at line 334 of file climisc.c.
Referenced by client_warming_sprite(), get_global_warming_tooltip(), and get_info_label_text_popup().
void handle_event | ( | const char * | featured_text, |
struct tile * | ptile, | ||
enum event_type | event, | ||
int | turn, | ||
int | phase, | ||
int | conn_id | ||
) |
Handles a chat or event message.
Definition at line 968 of file climisc.c.
Referenced by create_event(), handle_chat_msg(), and handle_early_chat_msg().
Create a map image definition on the client.
Definition at line 1409 of file climisc.c.
Referenced by mapimg_client_createmap().
void name_and_sort_items | ( | struct universal * | targets, |
int | num_targets, | ||
struct item * | items, | ||
bool | show_cost, | ||
struct city * | pcity | ||
) |
Takes an array of compound ids (cids). It will fill out an array of struct items and also sort it.
section 0: normal buildings section 1: Capitalization section 2: UTYF_CIVILIAN units section 3: other units section 4: small wonders section 5: great wonders
Definition at line 650 of file climisc.c.
Referenced by append_impr_or_unit_to_menu(), append_impr_or_unit_to_menu_item(), city_dialog::change_production(), city_dialog_update_building(), city_dialog_update_improvement_list(), city_widget::gen_production_labels(), city_production_model::populate(), refresh_worklist(), and city_dialog::update_improvements().
Return nuclear winter chance and rate of change, scaled to max.
Definition at line 344 of file climisc.c.
Referenced by client_cooling_sprite(), get_info_label_text_popup(), and get_nuclear_winter_tooltip().
Returns the current AI skill level on the server, if the same level is currently used for all current AI players and will be for new ones; else return ai_level_invalid() to indicate inconsistency.
Definition at line 1519 of file climisc.c.
Referenced by ai_skill_callback(), pregame_options::ailevel_change(), real_conn_list_dialog_update(), and pregame_options::update_ai_level().
enum unit_bg_color_type unit_color_type | ( | const struct unit_type * | punittype | ) |
Determines which color type should be used for unit background. This is only guesswork based on unit properties. One should not take UNIT_BG_FLYING seriously meaning that unit can fly - custom ruleset might have units with similar properties but explains these properties by some other means than by flying.