From 4ffd1c919c5b5a7a6cc7b830cc14652bcba8989f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Wed, 20 Oct 2021 19:32:33 +0300 Subject: [PATCH 52/52] Tell which building was the problematic one in ruleset sanity checks See osdn #42995 Signed-off-by: Marko Lindqvist --- server/rssanity.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/rssanity.c b/server/rssanity.c index e8589c8074..9defe85550 100644 --- a/server/rssanity.c +++ b/server/rssanity.c @@ -633,14 +633,16 @@ static bool rs_buildings(void) if (improvement_has_flag(pimprove, IF_GOLD) && pimprove->genus != IG_CONVERT) { ruleset_error(LOG_ERROR, - "Gold producing improvement with genus other than \"Convert\""); + "Gold producing improvement %s with genus other than \"Convert\"", + improvement_rule_name(pimprove)); return FALSE; } if (improvement_has_flag(pimprove, IF_DISASTER_PROOF) && pimprove->genus != IG_IMPROVEMENT) { ruleset_error(LOG_ERROR, - "Disasterproof improvement with genus other than \"Improvement\""); + "Disasterproof improvement %s with genus other than \"Improvement\"", + improvement_rule_name(pimprove)); return FALSE; } @@ -652,7 +654,8 @@ static bool rs_buildings(void) || get_potential_improvement_bonus(pimprove, NULL, EFT_SS_MODULE, RPT_POSSIBLE, FALSE))) { ruleset_error(LOG_ERROR, - "Space part with genus other than \"Special\""); + "Space part %s with genus other than \"Special\"", + improvement_rule_name(pimprove)); return FALSE; } -- 2.33.0