From 73f9926441ccef16406dde71a96755863e7fbfd8 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 4 Sep 2023 14:39:28 +0300 Subject: [PATCH 24/24] rscompat: Drop NoAggressive extra flag conversion That was a 3.1 -> 3.2 update, not relevant for main branch. See osdn #48584 Signed-off-by: Marko Lindqvist --- server/ruleset.c | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/server/ruleset.c b/server/ruleset.c index 60715fc731..02103af319 100644 --- a/server/ruleset.c +++ b/server/ruleset.c @@ -3747,30 +3747,16 @@ static bool load_ruleset_terrain(struct section_file *file, const char *sval = slist[j]; enum extra_flag_id flag; - if (compat->compat_mode && !fc_strcasecmp("NoAggressive", sval)) { - if (pextra->no_aggr_near_city >= 0) { - ruleset_error(NULL, LOG_ERROR, - "\"%s\" extra \"%s\" has both no_aggr_near_city set and old style " - "NoAggressive flag", - filename, extra_rule_name(pextra)); - ok = FALSE; - break; - } - /* Old NoAggressive flag meant distance of 3. */ - pextra->no_aggr_near_city = 3; - } else { - - flag = extra_flag_id_by_name(sval, fc_strcasecmp); + flag = extra_flag_id_by_name(sval, fc_strcasecmp); - if (!extra_flag_id_is_valid(flag)) { - ruleset_error(NULL, LOG_ERROR, - "\"%s\" extra \"%s\": unknown flag \"%s\".", - filename, extra_rule_name(pextra), sval); - ok = FALSE; - break; - } else { - BV_SET(pextra->flags, flag); - } + if (!extra_flag_id_is_valid(flag)) { + ruleset_error(NULL, LOG_ERROR, + "\"%s\" extra \"%s\": unknown flag \"%s\".", + filename, extra_rule_name(pextra), sval); + ok = FALSE; + break; + } else { + BV_SET(pextra->flags, flag); } } free(slist); -- 2.40.1