From cff064d98c5da6e4b084656d779705b1b9d234d9 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 9 Oct 2021 21:24:13 +0300 Subject: [PATCH 11/11] Sanity check that wonder upkeep is zero Reported by Lexxie See osdn #42994 Signed-off-by: Marko Lindqvist --- server/rssanity.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/server/rssanity.c b/server/rssanity.c index 45b283ef41..8a91843985 100644 --- a/server/rssanity.c +++ b/server/rssanity.c @@ -15,6 +15,9 @@ #include #endif +/* utility */ +#include "deprecations.h" + /* common */ #include "achievements.h" #include "effects.h" @@ -457,6 +460,14 @@ static bool rs_buildings(void) return FALSE; } + + if (is_wonder(pimprove) && pimprove->upkeep != 0) { + /* Not treating this as a hard error for the sake of the rulesets + * already in the wild. */ + log_deprecation("Ignoring nonzero upkeep value of %s as it's a wonder", + improvement_rule_name(pimprove)); + pimprove->upkeep = 0; /* Forced also in city_improvement_upkeep() */ + } } improvement_iterate_end; return TRUE; -- 2.33.0