Freeciv-3.2
|
Go to the source code of this file.
Functions | |
void | citizens_init (struct city *pcity) |
void | citizens_free (struct city *pcity) |
citizens | citizens_nation_get (const struct city *pcity, const struct player_slot *pslot) |
citizens | citizens_nation_foreign (const struct city *pcity) |
void | citizens_nation_set (struct city *pcity, const struct player_slot *pslot, citizens count) |
void | citizens_nation_add (struct city *pcity, const struct player_slot *pslot, int add) |
void | citizens_nation_move (struct city *pcity, const struct player_slot *pslot_from, const struct player_slot *pslot_to, int move) |
citizens | citizens_count (const struct city *pcity) |
struct player_slot * | citizens_random (const struct city *pcity) |
#define citizens_foreign_iterate | ( | _pcity, | |
_pslot, | |||
_nationality | |||
) |
Definition at line 58 of file citizens.h.
#define citizens_foreign_iterate_end } citizens_iterate_end; |
Definition at line 63 of file citizens.h.
#define citizens_iterate | ( | _pcity, | |
_pslot, | |||
_nationality | |||
) |
Definition at line 48 of file citizens.h.
#define citizens_iterate_end } player_slots_iterate_end; |
Definition at line 54 of file citizens.h.
Return the number of citizens in a city.
Definition at line 162 of file citizens.c.
Referenced by citizens_nation_foreign(), citizens_print(), citizens_random(), citizens_update(), handle_city_nationalities(), sg_load_player_city_citizens(), and sg_load_player_city_citizens().
Initialise citizens data.
Definition at line 32 of file citizens.c.
Referenced by create_city(), handle_city_nationalities(), sg_load_player_city_citizens(), and sg_load_player_city_citizens().
Add a (positive or negative) value to the citizens of the given nationality. As citizens is an unsigned value use int for the parameter 'add'.
The player_slot has to be used as the client does not has the exact knowledge about the players at certain points (especially at connecting).
Definition at line 104 of file citizens.c.
Referenced by citizens_nation_move(), citizens_reduction_apply(), citizens_update(), and do_city_migration().
Get the number of foreign citizens.
Definition at line 91 of file citizens.c.
Referenced by citizens_convert(), and is_minforeignpct_req_active().
Get the number of citizens with the given nationality.
The player_slot has to be used as the client does not has the exact knowledge about the players at certain points (especially at connecting).
Definition at line 74 of file citizens.c.
Referenced by api_methods_city_inspire_partisans(), check_city_migrations_player(), citizens_nation_add(), citizens_nation_foreign(), citizens_reduction_apply(), citizens_unit_nationality(), citizens_update(), city_incite_cost(), col_citizens(), do_city_migration(), package_city(), server_remove_player(), sg_save_player_cities(), and city_dialog::update_nation_table().
void citizens_nation_move | ( | struct city * | pcity, |
const struct player_slot * | pslot_from, | ||
const struct player_slot * | pslot_to, | ||
int | move | ||
) |
Convert a (positive or negative) value to the citizens from one nation to another. As citizens is an unsigned value use int for the parameter 'move'.
The player_slot has to be used as the client does not has the exact knowledge about the players at certain points (especially at connecting).
Definition at line 130 of file citizens.c.
Referenced by citizens_convert(), citizens_convert_conquest(), and server_remove_player().
Set the number of citizens with the given nationality.
The player_slot has to be used as the client does not has the exact knowledge about the players at certain points (especially at connecting).
Definition at line 145 of file citizens.c.
Referenced by citizens_nation_add(), citizens_update(), handle_city_nationalities(), sg_load_player_city_citizens(), and sg_load_player_city_citizens().
struct player_slot * citizens_random | ( | const struct city * | pcity | ) |
Return random citizen from city.
Definition at line 190 of file citizens.c.
Referenced by do_city_migration().