From ac7bbbcea7c1ea7f23c5b210c199cde74c35aa02 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 6 Apr 2021 15:53:00 +0300 Subject: [PATCH 23/23] Purge already built buildings from the worklist They used to be just postponed. This is not exactly targeted to the case where building is already built, but takes effect for any unknown reason for which building is not buildable at the moment. Requested anonymously See osdn #41925 Signed-off-by: Marko Lindqvist --- server/cityturn.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/server/cityturn.c b/server/cityturn.c index 161e8362ed..5d64224fd5 100644 --- a/server/cityturn.c +++ b/server/cityturn.c @@ -1868,14 +1868,10 @@ static bool worklist_change_build_target(struct player *pplayer, } requirement_vector_iterate_end; if (!known) { - /* This shouldn't happen... - FIXME: make can_city_build_improvement_now() return a reason enum. */ - notify_player(pplayer, city_tile(pcity), - E_CITY_CANTBUILD, ftc_server, - _("%s can't build %s from the worklist; " - "reason unknown! Postponing..."), - city_link(pcity), - city_improvement_name_translation(pcity, ptarget)); + /* FIXME: make can_city_build_improvement_now() return a reason enum, + * so we can notify user with it. + * Likely the building already exist. */ + purge = TRUE; } } else if (success) { /* Hey, we can upgrade the improvement! */ -- 2.30.2