From 62146b9b3bdc2a3c25e7d5b3906447211a1ba89d Mon Sep 17 00:00:00 2001 From: Sveinung Kvilhaugsvik Date: Wed, 28 Apr 2021 16:46:17 +0200 Subject: [PATCH] TerrainAlter for universal_fulfills_requirement(). Detect if a terrain type fulfills a TerrainAlter requirement. See osdn #42098 --- common/requirements.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/requirements.c b/common/requirements.c index 858d93a45e..5d9bedbc96 100644 --- a/common/requirements.c +++ b/common/requirements.c @@ -4864,6 +4864,10 @@ static enum req_item_found terrain_type_found(const struct requirement *preq, case VUT_TERRFLAG: return terrain_has_flag(source->value.terrain, preq->source.value.terrainflag) ? ITF_YES : ITF_NO; + case VUT_TERRAINALTER: + return (terrain_can_support_alteration(source->value.terrain, + preq->source.value.terrainalter) + ? ITF_YES : ITF_NO); default: /* Not found and not relevant. */ return ITF_NOT_APPLICABLE; -- 2.30.2