HostedRedmine.com has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...
Feature #905143 » 0013-Inline-is_city_center.patch
common/city.c | ||
---|---|---|
3208 | 3208 |
return pcity != game_city_by_number(pcity->id); |
3209 | 3209 |
} |
3210 | 3210 | |
3211 |
/************************************************************************** |
|
3212 |
Return TRUE if the city is centered at the given tile. |
|
3213 | ||
3214 |
NB: This doesn't simply check whether pcity->tile == ptile because that |
|
3215 |
would miss virtual clones made of city center tiles, which are used by |
|
3216 |
autosettler to judge whether improvements are worthwhile. The upshot is |
|
3217 |
that city centers would appear to lose their irrigation/farmland bonuses |
|
3218 |
as well as their minimum outputs of one food and one shield, and thus |
|
3219 |
autosettler would rarely transform or mine them. |
|
3220 |
**************************************************************************/ |
|
3221 |
bool is_city_center(const struct city *pcity, const struct tile *ptile) |
|
3222 |
{ |
|
3223 |
if (!pcity || !pcity->tile || !ptile) { |
|
3224 |
return FALSE; |
|
3225 |
} |
|
3226 | ||
3227 |
return tile_index(city_tile(pcity)) == tile_index(ptile); |
|
3228 |
} |
|
3229 | ||
3230 | 3211 |
/************************************************************************** |
3231 | 3212 |
Return TRUE if the city is worked without using up a citizen. |
3232 | 3213 |
**************************************************************************/ |
common/city.h | ||
---|---|---|
25 | 25 |
#include "fc_types.h" |
26 | 26 |
#include "name_translation.h" |
27 | 27 |
#include "improvement.h" |
28 |
#include "tile.h" |
|
28 | 29 |
#include "unitlist.h" |
29 | 30 |
#include "vision.h" |
30 | 31 |
#include "workertask.h" |
... | ... | |
737 | 738 | |
738 | 739 |
/* === */ |
739 | 740 | |
740 |
bool is_city_center(const struct city *pcity, const struct tile *ptile); |
|
741 |
/************************************************************************** |
|
742 |
Return TRUE if the city is centered at the given tile. |
|
743 | ||
744 |
NB: This doesn't simply check whether pcity->tile == ptile because that |
|
745 |
would miss virtual clones made of city center tiles, which are used by |
|
746 |
autosettler to judge whether improvements are worthwhile. The upshot is |
|
747 |
that city centers would appear to lose their irrigation/farmland bonuses |
|
748 |
as well as their minimum outputs of one food and one shield, and thus |
|
749 |
autosettler would rarely transform or mine them. |
|
750 |
**************************************************************************/ |
|
751 |
static inline bool is_city_center(const struct city *pcity, |
|
752 |
const struct tile *ptile) |
|
753 |
{ |
|
754 |
if (!pcity || !pcity->tile || !ptile) { |
|
755 |
return FALSE; |
|
756 |
} |
|
757 | ||
758 |
return tile_index(city_tile(pcity)) == tile_index(ptile); |
|
759 |
} |
|
760 | ||
741 | 761 |
bool is_free_worked(const struct city *pcity, const struct tile *ptile); |
742 | 762 | |
743 | 763 |
#define is_free_worked_index(city_tile_index) \ |
common/generate_packets.py | ||
---|---|---|
1648 | 1648 | |
1649 | 1649 |
/* common */ |
1650 | 1650 |
#include "actions.h" |
1651 |
#include "city.h" |
|
1651 | 1652 |
#include "disaster.h" |
1652 | 1653 | |
1653 | 1654 |
''') |
common/player.h | ||
---|---|---|
21 | 21 |
#include "bitvector.h" |
22 | 22 | |
23 | 23 |
/* common */ |
24 |
#include "city.h" |
|
25 | 24 |
#include "connection.h" |
26 | 25 |
#include "fc_types.h" |
27 | 26 |
#include "multipliers.h" |
... | ... | |
34 | 33 |
#include "unitlist.h" |
35 | 34 |
#include "vision.h" |
36 | 35 | |
36 |
struct city; |
|
37 | ||
37 | 38 |
#define PLAYER_DEFAULT_TAX_RATE 0 |
38 | 39 |
#define PLAYER_DEFAULT_SCIENCE_RATE 100 |
39 | 40 |
#define PLAYER_DEFAULT_LUXURY_RATE 0 |
common/style.h | ||
---|---|---|
18 | 18 |
extern "C" { |
19 | 19 |
#endif /* __cplusplus */ |
20 | 20 | |
21 |
/* common */ |
|
22 |
#include "requirements.h" |
|
23 | ||
21 | 24 |
struct nation_style |
22 | 25 |
{ |
23 | 26 |
int id; |
24 |
- |
- « Previous
- 1
- 2
- 3
- Next »