From fcc92da35095a6e9dcaae44696755ce440357a97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C5=82awomir=20Lach?= Date: Sun, 6 Nov 2022 12:05:02 +0100 Subject: [PATCH] =?UTF-8?q?!OSND:=20TICKET=20#45041=20:=20S=C5=82awomir=20?= =?UTF-8?q?Lach=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No behaviour changed. Only added is_counter_needed to tools/ruledit/validity module. It is not used yet. diff --git a/tools/ruledit/validity.c b/tools/ruledit/validity.c index 62d9410292..249c3cec71 100644 --- a/tools/ruledit/validity.c +++ b/tools/ruledit/validity.c @@ -173,6 +173,16 @@ static bool is_universal_needed(struct universal *uni, requirers_cb cb, return needed; } +/**********************************************************************//** + Check if anything in ruleset needs counter +**************************************************************************/ +bool is_counter_needed(struct counter *pcount, requirers_cb cb, void *data) +{ + struct universal uni = { .value.counter = pcount, .kind = VUT_COUNTER }; + + return is_universal_needed(&uni, cb, data); +} + /**********************************************************************//** Check if anything in ruleset needs tech **************************************************************************/ diff --git a/tools/ruledit/validity.h b/tools/ruledit/validity.h index b3498619f8..8910780948 100644 --- a/tools/ruledit/validity.h +++ b/tools/ruledit/validity.h @@ -27,6 +27,7 @@ bool is_government_needed(struct government *pgov, requirers_cb cb, void *data); bool is_extra_needed(struct extra_type *pextra, requirers_cb cb, void *data); bool is_multiplier_needed(struct multiplier *pmul, requirers_cb cb, void *data); bool is_terrain_needed(struct terrain *pterr, requirers_cb cb, void *data); +bool is_counter_needed(struct counter *pcount, requirers_cb cb, void *data); #ifdef __cplusplus } -- 2.38.0