Feature #1169 » 0069-Unhardcode-wld.map-from-city_support.patch
common/city.c | ||
---|---|---|
}
|
||
/**********************************************************************//**
|
||
Calculate upkeep costs. This builds the pcity->usage[] array as well
|
||
Calculate upkeep costs. This builds the pcity->usage[] array as well
|
||
as setting some happiness values.
|
||
**************************************************************************/
|
||
static inline void city_support(struct city *pcity)
|
||
static inline void city_support(const struct civ_map *nmap,
|
||
struct city *pcity)
|
||
{
|
||
int free_unhappy;
|
||
int max_mart_units;
|
||
const struct civ_map *nmap = &(wld.map);
|
||
/* Clear all usage values. */
|
||
memset(pcity->usage, 0, O_LAST * sizeof(*pcity->usage));
|
||
... | ... | |
set_city_bonuses(pcity);
|
||
/* Calculate the tile_cache[] values. */
|
||
city_tile_cache_update(nmap, pcity);
|
||
/* manage settlers, and units */
|
||
city_support(pcity);
|
||
/* Manage settlers, and units */
|
||
city_support(nmap, pcity);
|
||
}
|
||
/* Calculate output from citizens (uses city_tile_cache_get_output()). */
|