Freeciv-3.3
|
Go to the source code of this file.
Data Structures | |
struct | citizens_reduction |
Functions | |
void | citizens_update (struct city *pcity, struct player *plr) |
void | citizens_convert (struct city *pcity) |
void | citizens_convert_conquest (struct city *pcity) |
struct player * | citizens_unit_nationality (const struct city *pcity, int pop_cost, struct citizens_reduction *pchange) |
void | citizens_reduction_apply (struct city *pcity, const struct citizens_reduction *pchange) |
void | citizens_print (const struct city *pcity) |
Convert one (random) foreign citizen to the nationality of the owner.
Definition at line 340 of file citizenshand.c.
Referenced by update_city_activities().
Convert citizens to the nationality of the one conquering the city.
Definition at line 386 of file citizenshand.c.
Referenced by transfer_city().
Print the data about the citizens.
Definition at line 299 of file citizenshand.c.
Referenced by citizens_update().
Applies citizens reduction that may be planned previously in citizens_unit_nationality(). Does not check or change city size. If the nationality has less citizens that are to be removed, just removes as many as possible.
Definition at line 173 of file citizenshand.c.
Referenced by city_build_unit().
struct player * citizens_unit_nationality | ( | const struct city * | pcity, |
int | pop_cost, | ||
struct citizens_reduction * | pchange | ||
) |
Get the nationality of a unit built by the city and optionally the numbers of citizens to go into the unit from different nationalities. pcity must be a real city. The algorithm is the same as in citizens_update().
Definition at line 59 of file citizenshand.c.
Referenced by city_create_unit().
Update the nationality according to the city size. New citiens are added using the nationality of the owner. If the city size is reduced, the citizens are removed first from the foreign citizens.
Definition at line 202 of file citizenshand.c.
Referenced by city_add_unit(), city_reduce_size(), city_refresh_after_city_size_increase(), create_city(), sg_load_player_city_citizens(), and sg_load_player_city_citizens().