Feature #1085 » 0075-Add-universal_found_function-for-VUT_MINCITIES.patch
| common/requirements.c | ||
|---|---|---|
|
return ITF_NOT_APPLICABLE;
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
|
Find if number of cities fulfills a requirement
|
||
|
**************************************************************************/
|
||
|
static enum req_item_found mincities_found(const struct requirement *preq,
|
||
|
const struct universal *source)
|
||
|
{
|
||
|
fc_assert(source->value.min_cities);
|
||
|
if (preq->source.kind == VUT_MINCITIES) {
|
||
|
return preq->source.value.min_cities <= source->value.min_cities ? ITF_YES
|
||
|
: ITF_NO;
|
||
|
}
|
||
|
return ITF_NOT_APPLICABLE;
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
|
Find if an improvement fulfills a requirement
|
||
|
**************************************************************************/
|
||
| ... | ... | |
|
universal_found_function[VUT_DIPLREL_UNITANY] = &diplrel_found;
|
||
|
universal_found_function[VUT_DIPLREL_UNITANY_O] = &diplrel_found;
|
||
|
universal_found_function[VUT_UNITSTATE] = &ustate_found;
|
||
|
universal_found_function[VUT_MINCITIES] = &mincities_found;
|
||
|
}
|
||
|
/**********************************************************************//**
|
||
- « Previous
- 1
- 2
- Next »