Bug #2497 » 0001-infracache-Keep-extra-values-as-adv_want.patch
| 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(pcity != nullptr, 0);
|
||
|
fc_assert_ret_val(pcity->server.adv != nullptr, 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(pcity != nullptr, 0);
|
||
|
fc_assert_ret_val(pcity->server.adv != nullptr, 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 */
|
||
- « Previous
- 1
- 2
- Next »