From 9c522af448b37f61163aa0c46266ab67e6a63650 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 9 Nov 2021 04:24:26 +0200 Subject: [PATCH 21/21] Rulesave: Use common sex module See osdn #43031 Signed-off-by: Marko Lindqvist --- tools/ruleutil/rulesave.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/ruleutil/rulesave.c b/tools/ruleutil/rulesave.c index 527ceb4862..36079f0136 100644 --- a/tools/ruleutil/rulesave.c +++ b/tools/ruleutil/rulesave.c @@ -26,6 +26,7 @@ #include "map.h" #include "movement.h" #include "multipliers.h" +#include "sex.h" #include "specialist.h" #include "style.h" #include "unittype.h" @@ -1901,7 +1902,9 @@ static bool save_nation(struct section_file *sfile, struct nation_type *pnat, nation_leader_list_iterate(pnat->leaders, pleader) { secfile_insert_str(sfile, nation_leader_name(pleader), "%s.leaders%d.name", path, subsect_idx); - secfile_insert_str(sfile, nation_leader_is_male(pleader) ? "Male" : "Female", + secfile_insert_str(sfile, + nation_leader_is_male(pleader) ? + sex_rule_name(SEX_MALE) : sex_rule_name(SEX_FEMALE), "%s.leaders%d.sex", path, subsect_idx++); } nation_leader_list_iterate_end; -- 2.33.0