Project

General

Profile

Bug #2497 » 0001-infracache-Keep-extra-values-as-adv_want-S3_3-S3_2.patch

Sweet Tea Dorminy, 11/22/2026 03:20 AM

View differences:

server/advisors/infracache.c
city 'pcity'.
**************************************************************************/
void adv_city_worker_extra_set(struct city *pcity, int city_tile_index,
const struct extra_type *pextra, int value)
const struct extra_type *pextra,
adv_want value)
{
if (pcity->server.adv->act_cache_radius_sq
!= city_map_radius_sq_get(pcity)) {
......
city 'pcity'.
**************************************************************************/
void adv_city_worker_rmextra_set(struct city *pcity, int city_tile_index,
const struct extra_type *pextra, int value)
const struct extra_type *pextra,
adv_want value)
{
if (pcity->server.adv->act_cache_radius_sq
!= city_map_radius_sq_get(pcity)) {
......
Return the value for extra on tile 'city_tile_index' of
city 'pcity'.
**************************************************************************/
int adv_city_worker_extra_get(const struct city *pcity, int city_tile_index,
const struct extra_type *pextra)
adv_want adv_city_worker_extra_get(const struct city *pcity,
int city_tile_index,
const struct extra_type *pextra)
{
fc_assert_ret_val(NULL != pcity, 0);
fc_assert_ret_val(NULL != pcity->server.adv, 0);
......
Return the value for extra removal on tile 'city_tile_index' of
city 'pcity'.
**************************************************************************/
int adv_city_worker_rmextra_get(const struct city *pcity, int city_tile_index,
const struct extra_type *pextra)
adv_want adv_city_worker_rmextra_get(const struct city *pcity,
int city_tile_index,
const struct extra_type *pextra)
{
fc_assert_ret_val(NULL != pcity, 0);
fc_assert_ret_val(NULL != pcity->server.adv, 0);
server/advisors/infracache.h
adv_want adv_city_worker_act_get(const struct city *pcity, int city_tile_index,
enum unit_activity act_id);
void adv_city_worker_extra_set(struct city *pcity, int city_tile_index,
const struct extra_type *pextra, int value);
int adv_city_worker_extra_get(const struct city *pcity, int city_tile_index,
const struct extra_type *pextra);
const struct extra_type *pextra,
adv_want value);
adv_want adv_city_worker_extra_get(const struct city *pcity,
int city_tile_index,
const struct extra_type *pextra);
void adv_city_worker_rmextra_set(struct city *pcity, int city_tile_index,
const struct extra_type *pextra, int value);
int adv_city_worker_rmextra_get(const struct city *pcity, int city_tile_index,
const struct extra_type *pextra);
const struct extra_type *pextra,
adv_want value);
adv_want adv_city_worker_rmextra_get(const struct city *pcity,
int city_tile_index,
const struct extra_type *pextra);
#endif /* FC__INFRACACHE_H */
(1-1/2)