From c9bb20221ad38e269aa917c9e45e23abda55a7fa Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 6 Apr 2021 15:46:57 +0300 Subject: [PATCH 48/49] 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 334ab699be..340f92ee4c 100644 --- a/server/cityturn.c +++ b/server/cityturn.c @@ -1834,14 +1834,10 @@ static bool worklist_item_postpone_req_vec(struct universal *target, } 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), - tgt_name); + /* 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; } return purge; -- 2.30.2