From 6317563bfc5fb2ad400592e6d3e4e21eeb053b1b Mon Sep 17 00:00:00 2001 From: Procyonae <45432782+Procyonae@users.noreply.github.com> Date: Fri, 7 Jun 2024 13:09:56 +0100 Subject: [PATCH] Hopefully extract the mutable faction camp names --- lang/string_extractor/parsers/overmap_special.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/lang/string_extractor/parsers/overmap_special.py b/lang/string_extractor/parsers/overmap_special.py index 57e3cc6eb5c53..e1be1f2b0808e 100644 --- a/lang/string_extractor/parsers/overmap_special.py +++ b/lang/string_extractor/parsers/overmap_special.py @@ -1,8 +1,14 @@ from ..write_text import write_text +def parse_camp_name(overmap, origin): + if "camp_name" in overmap: + write_text(overmap["camp_name"], origin, + comment="Name of NPC faction camp") def parse_overmap_special(json, origin): - for overmap in json["overmaps"]: - if "camp_name" in overmap: - write_text(overmap["camp_name"], origin, - comment="Name of NPC faction camp") + if "subtype" in json and json["subtype"] == "mutable": + for mutable_overmap, overmap in json["overmaps"]: + parse_camp_name(overmap, origin) + else: + for overmap in json["overmaps"]: + parse_camp_name(overmap, origin)