Freeciv21
Develop your civilization from humble roots to a global empire
city Struct Reference

#include <city.h>

+ Collaboration diagram for city:

Public Attributes

char name [MAX_LEN_CITYNAME]
 
struct tiletile
 
struct playerowner
 
struct playeroriginal
 
int id
 
int style
 
enum capital_type capital
 
citizens size
 
citizens feel [CITIZEN_LAST][FEELING_LAST]
 
citizens specialists [SP_MAX]
 
citizens martial_law
 
citizens unit_happy_upkeep
 
citizensnationality
 
struct trade_route_list * routes
 
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 saved_surplus [O_LAST]
 
int bonus [O_LAST]
 
int food_stock
 
int shield_stock
 
int pollution
 
int illness_trade
 
int turn_plague
 
int city_radius_sq
 
int airlift
 
int bought_shields
 
bool did_buy
 
bool did_sell
 
bool was_happy
 
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
 
struct unit_list * units_supported
 
int history
 
struct worker_task_list * task_reqs
 
int steal
 
struct {
   int   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
 
      bool   needs_arrange
 
      bool   needs_refresh
 
      bool   synced
 
      bool   debug
 
      struct adv_city *   adv
 
      void *   ais [FREECIV_AI_MOD_LAST]
 
      struct vision *   vision
 
      time_t   prod_change_timestamp
 
      int   prod_change_turn
 
   }   server
 
   struct {
      bool   full
 
      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 291 of file city.h.

Member Data Documentation

◆ 

union { ... }

◆ adv

struct adv_city* city::adv

Definition at line 422 of file city.h.

Referenced by building_advisor(), dai_effect_value(), and dai_wonder_city_distance().

◆ airlift

◆ ais

void* city::ais[FREECIV_AI_MOD_LAST]

Definition at line 423 of file city.h.

◆ anarchy

int city::anarchy

◆ before_change_shields

◆ bonus

◆ bought_shields

◆ built

◆ buy_cost

int city::buy_cost

Definition at line 441 of file city.h.

◆ capital

◆ caravan_shields

◆ changed_from

◆ citizen_base

◆ city_image

int city::city_image

Definition at line 439 of file city.h.

◆ city_options

bv_city_options city::city_options

◆ city_radius_sq

◆ 

◆ cm_parameter

◆ collecting_info_units_present

struct unit_list* city::collecting_info_units_present

Definition at line 454 of file city.h.

◆ collecting_info_units_supported

struct unit_list* city::collecting_info_units_supported

Definition at line 453 of file city.h.

◆ color_index

int city::color_index

Definition at line 446 of file city.h.

◆ colored

bool city::colored

Definition at line 445 of file city.h.

◆ culture

int city::culture

Definition at line 440 of file city.h.

◆ debug

bool city::debug

Definition at line 420 of file city.h.

◆ did_buy

◆ did_sell

◆ disbanded_shields

◆ feel

◆ first_citizen_index

unsigned char city::first_citizen_index

Definition at line 459 of file city.h.

◆ food_stock

◆ full

bool city::full

Definition at line 434 of file city.h.

◆ happy

bool city::happy

Definition at line 437 of file city.h.

◆ history

◆ id

int city::id

Definition at line 296 of file city.h.

Referenced by action_auto_perf_unit_do(), action_not_enabled_reason(), action_selection_refresh(), governor::add_city_changed(), governor::add_city_new(), governor::add_city_remove(), freeciv::improvement_seller::add_to_menu(), adjust_ai_unit_choice(), adjust_improvement_wants_by_effects(), adjust_workers_button_pressed(), api_methods_unit_type_has_flag(), api_methods_unit_type_has_role(), cma_yoloswag::apply_result_on_server(), bodyguard_log_prefix(), building_advisor(), building_removed(), city_dialog::buy(), caravan_find_best_destination_withtransit(), center_next_player_capital(), city_build_building(), city_build_unit(), city_buy_production(), city_change_production(), city_change_size(), city_change_specialist(), city_create_unit(), city_freeze_workers_queue(), city_from_wonder(), city_increase_size(), city_is_virtual(), city_link(), city_map_update_radius_sq(), city_packet_common(), city_populate(), city_reduce_size(), city_refresh_queue_add(), city_dialog::city_rename(), city_rename(), city_sell_improvement(), city_set_worklist(), citylog_map_workers(), citymap_reserve_city_spot(), citymap_reserve_tile(), citymap_turn_init(), clear_worker_task(), client_plr_tile_city_id_get(), client_remove_city(), clipboard_send_production_packet(), cm_print_city(), cmafec_get_fe_parameter(), cmafec_set_fe_parameter(), create_city(), dai_airlift(), dai_caravan_goto(), dai_choose_diplomat_offensive(), dai_city_choose_build(), dai_data_phase_begin(), dai_diplomat_city(), dai_unit_attack(), dai_unit_make_homecity(), dai_upgrade_units(), diplomat_investigate(), disband_city(), city_dialog::disband_state_changed(), city_widget::display_list_menu(), city_dialog::display_worklist_menu(), do_city_migration(), do_disband_alternative(), do_unit_change_homecity(), do_unit_conquer_city(), do_unit_establish_trade(), domestic_advisor_choose_build(), editor_apply_tool(), execute_orders(), find_something_to_kill(), game_remove_city(), cma_yoloswag::handle_city(), handle_city_info(), handle_city_remove(), handle_city_short_info(), handle_edit_city_create(), handle_tile_info(), handle_unit_packet_common(), handle_unit_type_upgrade(), have_cities_trade_route(), idex_register_city(), idex_unregister_city(), cma_yoloswag::is_city_under_agent(), military_advisor_choose_build(), one_city_trade_benefit(), package_and_send_worker_tasks(), package_city(), popup_action_selection(), popup_incite_dialog(), popup_sabotage_dialog(), cma_yoloswag::put_city_under_agent(), reality_check_city(), city_dialog::refresh(), cma_yoloswag::release_city(), remove_city(), remove_trade_route(), request_unit_airlift(), request_unit_build_city(), request_unit_caravan_action(), request_unit_change_homecity(), request_unit_upgrade(), cma_yoloswag::result_came_from_server(), city_dialog::save_worklist(), send_rally_path_orders(), sg_load_player_cities(), sg_load_player_city(), sg_save_map_worked(), spy_send_sabotage_list(), tai_city_worker_requests_create(), 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_change_homecity_handling(), unit_conquer_city(), unit_do_destroy_city(), unit_do_disband_trad(), unit_virtual_create(), update_capital(), 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

Definition at line 403 of file city.h.

◆ illness_trade

int city::illness_trade

◆ info_units_present

struct unit_list* city::info_units_present

Definition at line 450 of file city.h.

◆ info_units_supported

struct unit_list* city::info_units_supported

Definition at line 449 of file city.h.

◆ last_turns_shield_surplus

int city::last_turns_shield_surplus

◆ length

int city::length

◆ martial_law

citizens city::martial_law

Definition at line 307 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 401 of file city.h.

◆ migration_score

float city::migration_score

Definition at line 400 of file city.h.

◆ name

◆ nationality

◆ need_updates

enum city_updates city::need_updates

Definition at line 454 of file city.h.

◆ needs_arrange

bool city::needs_arrange

Definition at line 411 of file city.h.

◆ needs_refresh

bool city::needs_refresh

Definition at line 415 of file city.h.

◆ occupied

bool city::occupied

Definition at line 435 of file city.h.

◆ orders

struct unit_order* city::orders

◆ original

◆ owner

◆ persistent

bool city::persistent

◆ pollution

◆ prod

◆ prod_change_timestamp

time_t city::prod_change_timestamp

Definition at line 428 of file city.h.

◆ prod_change_turn

int city::prod_change_turn

Definition at line 429 of file city.h.

◆ production

◆ 

◆ rapture

int city::rapture

Definition at line 356 of file city.h.

Referenced by city_rapture_grow(), sg_load_player_city(), and update_city_activity().

◆ routes

◆ saved_surplus

int city::saved_surplus[O_LAST]

◆ 

◆ shield_stock

◆ size

◆ specialists

◆ steal

◆ style

◆ surplus

◆ synced

bool city::synced

Definition at line 418 of file city.h.

◆ task_reqs

◆ tile

struct tile* city::tile

Definition at line 293 of file city.h.

Referenced by adjust_improvement_wants_by_effects(), adjust_wants_for_reqs(), api_methods_city_tile_get(), assess_danger_unit(), assess_defense_backend(), assess_defense_quadratic(), broadcast_city_info(), can_cities_trade(), can_city_build_improvement_direct(), can_city_build_improvement_later(), can_city_build_unit_direct(), can_city_build_unit_later(), caravan_find_best_destination_withtransit(), city_widget::center(), center_next_player_capital(), center_on_something(), city_base_to_city_map(), city_change_size(), city_create_unit(), city_gold_worth(), city_got_defense_effect(), city_incite_cost(), city_log_prefix(), city_populate(), city_production_unit_veteran_level(), city_reduce_size(), city_support(), city_tile(), city_tile_cache_update(), city_unit_present(), city_widget::city_view(), city_waste(), cityrep_buy(), client_remove_unit(), cr_entry_attack(), cr_entry_continent(), cr_entry_defense(), cr_entry_present(), create_city_virtual(), dai_caravan_can_trade_cities_diff_cont(), dai_caravan_goto(), 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_boat_for_unit(), dai_hunter_find(), dai_hunter_missile_want(), dai_manage_caravan(), dai_manage_diplomat(), dai_manage_hitpoint_recovery(), dai_manage_paratrooper(), dai_military_attack(), dai_military_attack_barbarian(), dai_military_bodyguard(), dai_military_defend(), dai_military_findjob(), dai_upgrade_units(), diplomat_get_tech(), diplomat_incite(), diplomat_investigate(), diplomat_sabotage(), disband_city(), do_airline(), find_city_or_settler_near_tile(), find_city_to_diplomat(), game_remove_unit(), get_caravan_enter_city_trade_bonus(), city_dialog::get_city(), get_final_city_output_bonus(), goto_dialog::go_to_city(), cma_yoloswag::handle_city(), handle_city_change(), handle_city_info(), handle_city_rename(), handle_city_short_info(), handle_diplomacy_create_clause_req(), handle_unit_packet_common(), is_city_center(), unit_hud_selector::island_filter(), link_mark_tile(), map_claim_border(), max_tile_trade(), military_advisor_choose_build(), min_food_surplus_for_fastest_growth(), num_continent_buildings(), traditional_citybar_painter::paint(), polished_citybar_painter::paint(), paste_tile(), real_city_dialog_popup(), really_handle_city_buy(), really_handle_city_sell(), reestablish_city_trade_routes(), refresh_dumb_city(), trade_generator::remove_city(), search_homecity_for_caravan(), city_widget::select_coastal(), city_widget::select_same_island(), send_city_info(), city_dialog::setup_ui(), sg_load_player_city(), mr_menu::slot_autocaravan(), teleport_unit_to_city(), text_happiness_units(), toggle_city_color(), trade_base_between_cities(), transfer_city_units(), transfer_unit(), try_summon_barbarians(), unit_virtual_create(), update_dumb_city(), city_dialog::update_units(), upgrade_city_extras(), and vision_site_update_from_city().

◆ tile_cache

struct tile_cache* city::tile_cache

◆ tile_cache_radius_sq

int city::tile_cache_radius_sq

Definition at line 321 of file city.h.

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

◆ turn_founded

◆ turn_last_built

◆ turn_plague

int city::turn_plague

◆ unhappy

bool city::unhappy

Definition at line 438 of file city.h.

◆ unhappy_penalty

int city::unhappy_penalty[O_LAST]

◆ unit_happy_upkeep

citizens city::unit_happy_upkeep

Definition at line 308 of file city.h.

Referenced by citizen_happy_units(), and city_support().

◆ units_supported

◆ usage

◆ vigilant

bool city::vigilant

◆ vision

struct vision* city::vision

Definition at line 425 of file city.h.

◆ walls

int city::walls

Definition at line 436 of file city.h.

◆ was_happy

bool city::was_happy

◆ waste

◆ workers_frozen

int city::workers_frozen

Definition at line 406 of file city.h.

◆ worklist