30 if (!
game.
info.citizen_nationality) {
68 if (!
game.
info.citizen_nationality) {
101 if (!
game.
info.citizen_nationality) {
140 if (!
game.
info.citizen_nationality) {
159 if (!
game.
info.citizen_nationality) {
172 count += nationality;
179 return static_cast<citizens>(count);
192 chocen -= nationality;
void citizens_free(struct city *pcity)
Free citizens data.
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.
void citizens_nation_add(struct city *pcity, const struct player_slot *pslot, int add)
Add a (positive or negative) value to the citizens of the given nationality.
citizens citizens_nation_get(const struct city *pcity, const struct player_slot *pslot)
Get the number of citizens with the given nationality.
void citizens_nation_set(struct city *pcity, const struct player_slot *pslot, citizens count)
Set the number of citizens with the given nationality.
citizens citizens_nation_foreign(const struct city *pcity)
Get the number of foreign citizens.
struct player_slot * citizens_random(const struct city *pcity)
Return random citizen from city.
citizens citizens_count(const struct city *pcity)
Return the number of citizens in a city.
void citizens_init(struct city *pcity)
Initialise citizens data.
#define citizens_iterate_end
#define citizens_iterate(_pcity, _pslot, _nationality)
struct player * city_owner(const struct city *pcity)
Return the owner of the city.
citizens city_size_get(const struct city *pcity)
Get the city size.
#define MAX_NUM_PLAYER_SLOTS
bool is_server()
Is program type server?
#define fc_assert_ret(condition)
#define fc_assert(condition)
#define fc_assert_ret_val(condition, val)
int player_slot_index(const struct player_slot *pslot)
Returns the index of the player slot.
struct player * player_slot_get_player(const struct player_slot *pslot)
Returns the team corresponding to the slot.
struct packet_game_info info