From 03062df09dd04bc0533ed8d486fc818a65d5f6c8 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 27 May 2023 01:56:26 +0300 Subject: [PATCH 20/20] Purge worklist items with unreachable terrain class requirements Assume that terrain class requirements not fulfilled currently are never going to be fulfilled, so purge worklist items instead of postponing Requested by alain_bkr See osdn #47493 Signed-off-by: Marko Lindqvist --- server/cityturn.c | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/server/cityturn.c b/server/cityturn.c index ba6d2ccfa4..0521456468 100644 --- a/server/cityturn.c +++ b/server/cityturn.c @@ -1751,29 +1751,9 @@ static bool worklist_item_postpone_req_vec(struct universal *target, purge = TRUE; break; case VUT_TERRAINCLASS: - if (preq->present) { - notify_player(pplayer, city_tile(pcity), - E_CITY_CANTBUILD, ftc_server, - Q_("?terrainclass:%s can't build %s from the " - "worklist; %s terrain is required." - " Postponing..."), - city_link(pcity), - tgt_name, - terrain_class_name_translation(preq->source.value.terrainclass)); - script_server_signal_emit(signal_name, ptarget, - pcity, "need_terrainclass"); - } else { - notify_player(pplayer, city_tile(pcity), - E_CITY_CANTBUILD, ftc_server, - Q_("?terrainclass:%s can't build %s from the " - "worklist; %s terrain is prohibited." - " Postponing..."), - city_link(pcity), - tgt_name, - terrain_class_name_translation(preq->source.value.terrainclass)); - script_server_signal_emit(signal_name, ptarget, - pcity, "have_terrainclass"); - } + /* Change of terrain class is expected to be very unlikely. Purge! + * TODO: Analyze ruleset to see how unlikely terrain class change actually is. */ + purge = TRUE; break; case VUT_TERRFLAG: if (preq->present) { -- 2.39.2