Bug #1942 ยป 0072-Make-celebration-to-affect-city-outputs-on-turn-it-b.patch
| common/city.c | ||
|---|---|---|
|
}
|
||
|
/**********************************************************************//**
|
||
|
cities celebrate only after consecutive happy turns
|
||
|
Cities celebrate only after consecutive happy turns
|
||
|
**************************************************************************/
|
||
|
bool city_celebrating(const struct city *pcity)
|
||
|
{
|
||
| server/cityturn.c | ||
|---|---|---|
|
struct government *gov;
|
||
|
bool is_happy;
|
||
|
bool is_celebrating;
|
||
|
bool celebration_change = FALSE;
|
||
|
if (!pcity) {
|
||
|
return;
|
||
| ... | ... | |
|
notify_player(pplayer, city_tile(pcity), E_CITY_LOVE, ftc_server,
|
||
|
_("Celebrations in your honor in %s."),
|
||
|
city_link(pcity));
|
||
|
celebration_change = TRUE;
|
||
|
}
|
||
|
} else {
|
||
|
if (pcity->rapture != 0) {
|
||
|
notify_player(pplayer, city_tile(pcity), E_CITY_NORMAL, ftc_server,
|
||
|
_("Celebrations canceled in %s."),
|
||
|
city_link(pcity));
|
||
|
celebration_change = TRUE;
|
||
|
}
|
||
|
/* Update city's celebrating counters */
|
||
| ... | ... | |
|
}
|
||
|
}
|
||
|
/* Refresh city again, after happiness calculations.
|
||
|
* This makes celebration to affect output on the first turn it happens. */
|
||
|
if (celebration_change && city_refresh(pcity)) {
|
||
|
auto_arrange_workers(pcity);
|
||
|
}
|
||
|
/* City population updated here, after the rapture stuff above. --Jing */
|
||
|
saved_id = pcity->id;
|
||
|
pcity->had_famine = FALSE;
|
||