Freeciv-3.2
Loading...
Searching...
No Matches
Data Fields
city Struct Reference

#include <city.h>

Data Fields

charname
 
struct tiletile
 
struct playerowner
 
struct playeroriginal
 
int id
 
int style
 
enum capital_type capital
 
enum city_acquire_type acquire_t
 
citizens size
 
citizens feel [CITIZEN_LAST][FEELING_LAST]
 
citizens specialists [SP_MAX]
 
citizens martial_law
 
citizens unit_happy_upkeep
 
citizensnationality
 
struct trade_route_listroutes
 
struct tile_cachetile_cache
 
int tile_cache_radius_sq
 
int surplus [O_LAST]
 
int waste [O_LAST]
 
int unhappy_penalty [O_LAST]
 
int prod [O_LAST]
 
int citizen_base [O_LAST]
 
int usage [O_LAST]
 
int bonus [O_LAST]
 
int abs_bonus [O_LAST]
 
int food_stock
 
int shield_stock
 
int pollution
 
int illness_trade
 
int turn_plague
 
int city_radius_sq
 
int airlift
 
bool did_buy
 
bool did_sell
 
bool was_happy
 
bool had_famine
 
int anarchy
 
int rapture
 
int turn_founded
 
int turn_last_built
 
int before_change_shields
 
int caravan_shields
 
int disbanded_shields
 
int last_turns_shield_surplus
 
struct built_status built [B_LAST]
 
struct universal production
 
struct universal changed_from
 
struct worklist worklist
 
bv_city_options city_options
 
enum city_wl_cancel_behavior wlcb
 
struct unit_list * units_supported
 
intcounter_values
 
int history
 
struct worker_task_listtask_reqs
 
int steal
 
struct { 
 
   size_t   length 
 
   bool   persistent 
 
   bool   vigilant 
 
   struct unit_order *   orders 
 
rally_point 
 
struct cm_parametercm_parameter
 
union { 
 
   struct { 
 
      float   migration_score 
 
      int   mgr_score_calc_turn 
 
      int   illness 
 
      int   workers_frozen 
 
      enum city_needs_arrange   needs_arrange 
 
      bool   needs_refresh 
 
      bool   synced 
 
      bool   debug 
 
      struct adv_city *   adv 
 
      void *   ais [FREECIV_AI_MOD_LAST
 
      struct vision *   vision 
 
   }   server 
 
   struct { 
 
      bool   occupied 
 
      int   walls 
 
      bool   happy 
 
      bool   unhappy 
 
      int   city_image 
 
      int   culture 
 
      int   buy_cost 
 
      bool   colored 
 
      int   color_index 
 
      struct unit_list *   info_units_supported 
 
      struct unit_list *   info_units_present 
 
      struct unit_list *   collecting_info_units_supported 
 
      struct unit_list *   collecting_info_units_present 
 
      enum city_updates   need_updates 
 
      unsigned char   first_citizen_index 
 
   }   client 
 
};  
 

Detailed Description

Definition at line 320 of file city.h.

Field Documentation

◆ [union]

union { ... } city

◆ abs_bonus

int city::abs_bonus[O_LAST]

Definition at line 364 of file city.h.

Referenced by create_city_virtual(), set_city_bonuses(), and set_city_production().

◆ acquire_t

enum city_acquire_type city::acquire_t

◆ adv

struct adv_city* city::adv

◆ airlift

int city::airlift

◆ ais

Definition at line 453 of file city.h.

Referenced by city_ai_data(), and city_set_ai_data().

◆ anarchy

int city::anarchy

◆ before_change_shields

int city::before_change_shields

◆ bonus

int city::bonus[O_LAST]

◆ built

struct built_status city::built[B_LAST]

◆ buy_cost

int city::buy_cost

◆ capital

enum capital_type city::capital

◆ caravan_shields

int city::caravan_shields

◆ changed_from

struct universal city::changed_from

◆ citizen_base

int city::citizen_base[O_LAST]

◆ city_image

int city::city_image

Definition at line 464 of file city.h.

Referenced by get_city_sprite(), handle_city_info(), and handle_city_short_info().

◆ city_options

bv_city_options city::city_options

◆ city_radius_sq

int city::city_radius_sq

◆ [struct]

struct { ... } city::client

◆ cm_parameter

struct cm_parameter* city::cm_parameter

◆ collecting_info_units_present

struct unit_list* city::collecting_info_units_present

◆ collecting_info_units_supported

struct unit_list* city::collecting_info_units_supported

◆ color_index

int city::color_index

Definition at line 470 of file city.h.

Referenced by fill_city_overlays_sprite_array(), and toggle_city_color().

◆ colored

bool city::colored

Definition at line 469 of file city.h.

Referenced by fill_city_overlays_sprite_array(), and toggle_city_color().

◆ counter_values

int* city::counter_values

◆ culture

int city::culture

◆ debug

bool city::debug

Definition at line 450 of file city.h.

Referenced by auto_arrange_workers(), citizens_update(), and debug_command().

◆ did_buy

bool city::did_buy

◆ did_sell

bool city::did_sell

◆ disbanded_shields

int city::disbanded_shields

◆ feel

◆ first_citizen_index

unsigned char city::first_citizen_index

Definition at line 483 of file city.h.

Referenced by city_packet_common(), and get_citizen_sprite().

◆ food_stock

int city::food_stock

◆ had_famine

bool city::had_famine

◆ happy

bool city::happy

◆ history

int city::history

◆ id

int city::id

Definition at line 326 of file city.h.

Referenced by actres_possible(), adjust_improvement_wants_by_effects(), adjust_workers_button_pressed(), agents_city_changed(), agents_city_new(), agents_city_remove(), api_edit_perform_action_unit_vs_city(), api_edit_perform_action_unit_vs_city_impr(), api_edit_perform_action_unit_vs_city_tech(), apply_result_on_server(), building_removed(), city_dialog::buy(), caravan_find_best_destination_withtransit(), cause_a_city_changed_for_agent(), center_next_player_capital(), city_build_building(), city_build_unit(), city_buy_production(), city_change_production(), city_change_size(), city_change_specialist(), city_counters_refresh(), city_create_unit(), city_freeze_workers_queue(), city_from_wonder(), city_is_virtual(), city_link(), city_map_update_radius_sq(), city_model_find(), city_model_set(), city_packet_common(), city_populate(), city_reduce_size(), city_refresh_queue_add(), city_dialog::city_rename(), city_rename(), city_sell_improvement(), city_set_worklist(), city_toggle_worker(), citylog_map_workers(), cityopt_callback(), clear_worker_task(), client_plr_tile_city_id_get(), client_remove_city(), clipboard_send_production_packet(), cm_print_city(), cma_is_city_under_agent(), cma_put_city_under_agent(), cma_release_city(), cmafec_get_fe_parameter(), cmafec_set_fe_parameter(), city_map::context_menu(), create_city(), dai_choose_diplomat_offensive(), dai_city_choose_build(), dai_data_phase_begin(), dai_effect_value(), dai_unit_make_homecity(), dai_upgrade_units(), diplomat_investigate(), disband_city(), city_dialog::disband_state_changed(), city_dialog::display_worklist_menu(), do_city_migration(), do_disband_alternative(), do_unit_change_homecity(), domestic_advisor_choose_build(), editor_apply_tool(), find_something_to_kill(), game_remove_city(), handle_city(), handle_city_info(), handle_city_make_specialist(), handle_city_make_worker(), handle_city_remove(), handle_city_short_info(), handle_edit_city_create(), handle_unit_type_upgrade(), idex_register_city(), idex_unregister_city(), is_action_possible(), military_advisor_choose_build(), misc_panel_city_dlg_callback(), impr_item::mouseDoubleClickEvent(), objbind_get_value_from_object(), objbind_pack_current_values(), one_city_trade_benefit(), package_and_send_worker_tasks(), package_city(), place_unit(), popup_incite_dialog(), popup_sabotage_dialog(), rally_set_tile(), real_bodyguard_log(), real_city_report_update_city(), real_menus_update(), reality_check_city(), remove_city(), request_unit_airlift(), request_unit_build_city(), request_unit_change_homecity(), request_unit_upgrade(), city_dialog::save_worklist(), sell_imprvm_dlg_ok_callback(), send_rally_path_orders(), set_city_workertask(), sg_load_player_cities(), sg_load_player_cities(), sg_load_player_city(), sg_load_player_city(), sg_save_map_worked(), spy_send_sabotage_list(), texai_city_destroyed(), texai_city_info_recv(), texai_city_update(), texai_city_worker_requests_create(), text_tag_initv(), text_tag_start_sequence(), throw_units_from_illegal_cities(), transfer_city(), transfer_city_units(), unit_conquer_city(), unit_virtual_create(), units_orders_city_dlg_callback(), update_city_activity(), update_dumb_city(), vision_site_new_from_city(), vision_site_update_from_city(), wonder_built(), wonder_destroyed(), and worklist_change_build_target().

◆ illness

int city::illness

◆ illness_trade

int city::illness_trade

◆ info_units_present

struct unit_list* city::info_units_present

◆ info_units_supported

struct unit_list* city::info_units_supported

◆ last_turns_shield_surplus

int city::last_turns_shield_surplus

◆ length

size_t city::length

◆ martial_law

citizens city::martial_law

Definition at line 338 of file city.h.

Referenced by citizen_happy_units(), and city_support().

◆ mgr_score_calc_turn

int city::mgr_score_calc_turn

Definition at line 432 of file city.h.

Referenced by city_migration_score(), and create_city_virtual().

◆ migration_score

float city::migration_score

Definition at line 431 of file city.h.

Referenced by city_migration_score().

◆ name

char* city::name

◆ nationality

citizens* city::nationality

◆ need_updates

enum city_updates city::need_updates

Definition at line 481 of file city.h.

Referenced by city_report_dialog_update_city(), popup_city_dialog(), and refresh_city_dialog().

◆ needs_arrange

enum city_needs_arrange city::needs_arrange

◆ needs_refresh

bool city::needs_refresh

Definition at line 445 of file city.h.

Referenced by city_refresh(), and city_refresh_queue_add().

◆ occupied

bool city::occupied

◆ orders

struct unit_order* city::orders

◆ original

struct player* city::original

◆ owner

struct player* city::owner

◆ persistent

bool city::persistent

◆ pollution

int city::pollution

◆ prod

int city::prod[O_LAST]

◆ production

struct universal city::production

Definition at line 396 of file city.h.

Referenced by adjust_improvement_wants_by_effects(), apply_disaster(), base_city_queue_insert(), building_advisor(), change_build_target(), city_dialog::change_production(), choose_build_target(), cid_encode_from_city(), city_build_building(), city_build_stuff(), city_build_unit(), city_building_impr_or_unit(), city_can_buy(), city_choose_build_default(), city_dialog_update_building(), city_get_queue(), city_increase_size(), city_production_build_shield_cost(), city_production_build_units(), city_production_buy_gold_cost(), city_production_has_flag(), city_production_is_genus(), city_production_name_translation(), city_production_turns_to_build(), city_select_building_callback(), city_select_building_callback(), city_set_queue(), city_turn_notify(), city_worklist_commit(), cityrep_buy(), clipboard_copy_production(), clipboard_send_production_packet(), dai_choose_help_wonder(), define_orig_production_values(), diplomat_sabotage(), disband_city(), get_city_mapview_production(), get_current_construction_bonus(), get_prod_complete_string(), handle_city_change(), handle_city_info(), ok_worklist_editor_callback(), package_city(), popup_worklist_editor(), real_city_report_dialog_update_city(), really_handle_city_buy(), redraw_city_dialog(), city_widget::select_building_something(), send_rally_tile(), sg_load_player_city(), sg_load_player_city(), should_force_recalc(), transfer_city(), city_dialog::update_building(), upgrade_building_prod(), upgrade_unit_prod(), and wonder_benefit().

◆ [struct]

struct { ... } city::rally_point

◆ rapture

int city::rapture

◆ routes

struct trade_route_list* city::routes

◆ [struct]

struct { ... } city::server

◆ shield_stock

int city::shield_stock

◆ size

citizens city::size

◆ specialists

citizens city::specialists[SP_MAX]

◆ steal

int city::steal

◆ style

int city::style

◆ surplus

int city::surplus[O_LAST]

◆ synced

bool city::synced

◆ task_reqs

struct worker_task_list* city::task_reqs

◆ tile

struct tile* city::tile

Definition at line 322 of file city.h.

Referenced by action_may_happen_unit_on_city(), action_maybe_possible_actor_unit(), action_prob_self_full(), action_prob_vs_city_full(), action_prob_vs_extras_full(), action_prob_vs_stack_full(), action_prob_vs_tile_full(), action_prob_vs_unit_full(), trade_generator::add_tile(), adjust_improvement_wants_by_effects(), adjust_wants_for_reqs(), agents_city_new(), agents_city_remove(), ap_dipl_battle_win(), api_effects_tile_bonus(), api_methods_city_tile_get(), assess_defense_backend(), assess_defense_quadratic(), broadcast_city_info(), button_down_citymap(), can_city_build_improvement_direct(), can_city_build_improvement_later(), can_city_build_unit_direct(), can_city_build_unit_later(), can_disaster_happen(), caravan_find_best_destination_withtransit(), caravan_result_init(), casus_belli_range_for(), city_widget::center(), center_iterate(), center_next_player_capital(), center_on_something(), city_base_to_city_map(), city_change_size(), city_create_unit(), city_dialog_update_present_units(), city_gold_worth(), city_got_defense_effect(), city_incite_cost(), city_landlocked_sell_coastal_improvements(), city_populate(), city_production_unit_veteran_level(), city_reduce_size(), city_select_coastal_callback(), city_select_coastal_callback(), city_style(), city_support(), city_tile_cache_update(), city_tile_output(), city_unit_present(), city_widget::city_view(), cityrep_buy(), client_remove_unit(), city_map::context_menu(), cr_entry_attack(), cr_entry_continent(), cr_entry_defense(), cr_entry_present(), create_city_virtual(), dai_can_city_build_improvement_later(), dai_caravan_can_trade_cities_diff_cont(), dai_choose_defender_versus(), dai_choose_help_wonder(), dai_choose_paratrooper(), dai_choose_trade_route(), dai_city_sell_noncritical(), dai_diplomat_defend(), dai_effect_value(), dai_find_source_building(), dai_hunter_find(), dai_hunter_missile_want(), dai_manage_caravan(), dai_military_attack(), dai_military_defend(), dai_upgrade_units(), dai_wants_defender_against(), defense_multiplication(), diplomat_get_tech(), diplomat_incite(), diplomat_investigate(), diplomat_sabotage(), diplomat_success_vs_defender(), disband_city(), do_heal_unit(), draw_calculated_trade_routes(), dsend_packet_edit_city_create(), dsend_packet_edit_unit_create(), dsend_packet_edit_unit_remove(), fill_city_overlays_sprite_array(), trade_generator::find_certain_routes_inner(), find_city_callback(), find_city_or_settler_near_tile(), find_response(), find_selection_callback(), game_remove_unit(), get_city_bonus(), get_city_tile_output_bonus(), get_tile_bonus(), get_tile_output_bonus(), get_total_attack_power(), get_unit_vs_tile_bonus(), get_unittype_bonus(), goods_can_be_provided(), handle_city(), handle_city_change(), handle_city_info(), handle_city_rename(), handle_city_short_info(), handle_city_update_counters(), handle_diplomacy_create_clause_req(), improvement_obsolete(), is_action_enabled_unit_on_city_full(), is_action_enabled_unit_on_extras_full(), is_action_enabled_unit_on_self_full(), is_action_enabled_unit_on_stack_full(), is_action_enabled_unit_on_tile_full(), is_action_enabled_unit_on_unit_full(), is_city_center(), unit_hud_selector::island_filter(), link_mark_tile(), max_tile_trade(), military_advisor_choose_build(), min_food_surplus_for_fastest_growth(), nearest_gov_center(), num_continent_buildings(), num_present_units_in_city(), paste_tile(), popup_hurry_production_dialog(), popup_incite_dialog(), popup_iterate(), process_attacker_want(), real_city_dialog_refresh(), real_city_log(), really_handle_city_buy(), really_handle_city_sell(), redraw_army_city_dialog(), reestablish_city_trade_routes(), refresh_dumb_city(), trade_generator::remove_city(), trade_generator::remove_virtual_city(), right_button_down_citymap(), same_island_iterate(), sdi_try_defend(), city_widget::select_coastal(), city_widget::select_same_island(), send_city_info(), sg_load_player_city(), sg_load_player_city(), show_full_citybar(), show_units_response(), mr_menu::slot_autocaravan(), switch_city_callback(), teleport_unit_to_city(), toggle_city_color(), transfer_city_units(), unit_attack_civilian_casualties(), unit_bribe_cost(), unit_virtual_create(), update_city_description(), update_dumb_city(), city_dialog::update_units(), upgrade_city_extras(), utype_needs_improvement(), utype_pays_mp_for_action_estimate(), vision_site_update_from_city(), and worklist_item_postpone_req_vec().

◆ tile_cache

struct tile_cache* city::tile_cache

◆ tile_cache_radius_sq

int city::tile_cache_radius_sq

Definition at line 352 of file city.h.

Referenced by city_tile_cache_get_output(), city_tile_cache_update(), and create_city_virtual().

◆ turn_founded

int city::turn_founded

◆ turn_last_built

int city::turn_last_built

◆ turn_plague

int city::turn_plague

◆ unhappy

bool city::unhappy

◆ unhappy_penalty

int city::unhappy_penalty[O_LAST]

◆ unit_happy_upkeep

citizens city::unit_happy_upkeep

Definition at line 339 of file city.h.

Referenced by citizen_happy_units(), and city_support().

◆ units_supported

struct unit_list* city::units_supported

◆ usage

int city::usage[O_LAST]

◆ vigilant

bool city::vigilant

◆ vision

struct vision* city::vision

◆ walls

int city::walls

Definition at line 461 of file city.h.

Referenced by fill_sprite_array(), handle_city_info(), and handle_city_short_info().

◆ was_happy

bool city::was_happy

◆ waste

int city::waste[O_LAST]

◆ wlcb

◆ workers_frozen

int city::workers_frozen

Definition at line 437 of file city.h.

Referenced by auto_arrange_workers(), city_freeze_workers(), and city_thaw_workers().

◆ worklist

struct worklist city::worklist