From 86c1280897d578bb127b89a7c11ed79157877135 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 9 Oct 2021 21:19:54 +0300 Subject: [PATCH 15/16] Sanity check that wonder upkeep is zero Reported by Lexxie See osdn #42994 Signed-off-by: Marko Lindqvist --- server/rssanity.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/server/rssanity.c b/server/rssanity.c index 465157f187..e43d532a98 100644 --- a/server/rssanity.c +++ b/server/rssanity.c @@ -599,6 +599,14 @@ static bool rs_buildings(void) "Space part with genus other than \"Special\""); 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