From 9f2f567c7af8ba07e4ddd6ed8d814d7afc76e468 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 9 Jul 2023 02:19:13 +0300 Subject: [PATCH 23/23] AI: Correct contemplate_new_city() header It referred to long-gone ai_settler_init() Replaced by citymap_turn_init() See osdn #48368 Signed-off-by: Marko Lindqvist --- ai/default/daisettler.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/ai/default/daisettler.c b/ai/default/daisettler.c index 881b6cd804..92546a3b71 100644 --- a/ai/default/daisettler.c +++ b/ai/default/daisettler.c @@ -1280,11 +1280,12 @@ static enum cb_error_level dai_do_build_city(struct ai_type *ait, player_name(pplayer), TILE_XY(ptile), reason); return CBE_FATAL; } + return CBE_RECOVERABLE; } - /* We have to rebuild at least the cache for this city. This event is - * rare enough we might as well build the whole thing. Who knows what + /* We have to rebuild at least the cache for this city. This event is + * rare enough we might as well build the whole thing. Who knows what * else might be cached in the future? */ fc_assert_ret_val(pplayer == city_owner(pcity), FALSE); initialize_infrastructure_cache(pplayer); @@ -1297,7 +1298,7 @@ static enum cb_error_level dai_do_build_city(struct ai_type *ait, /*************************************************************************//** Return want for city settler. Note that we rely here on the fact that - ai_settler_init() has been run while doing autosettlers. + citymap_turn_init() has been run while doing autosettlers. *****************************************************************************/ void contemplate_new_city(struct ai_type *ait, struct city *pcity) { @@ -1333,11 +1334,11 @@ void contemplate_new_city(struct ai_type *ait, struct city *pcity) CITY_LOG(LOG_DEBUG, pcity, "want(%d) to establish city at" " (%d, %d) and will %s to get there", result->result, - TILE_XY(result->tile), - (result->virt_boat ? "build a boat" : + TILE_XY(result->tile), + (result->virt_boat ? "build a boat" : (result->overseas ? "use a boat" : "walk"))); - city_data->founder_want = (result->virt_boat ? + city_data->founder_want = (result->virt_boat ? -result->result : result->result); city_data->founder_boat = result->overseas; -- 2.40.1