-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hopefully extract the mutable faction camp names
- Loading branch information
Showing
1 changed file
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
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 overmap and overmap["subtype"] == "mutable": | ||
Check failure on line 9 in lang/string_extractor/parsers/overmap_special.py GitHub Actions / check
|
||
for overmap in json["overmaps"]: | ||
for mutable_overmap, overmap in overmap.items(): | ||
parse_camp_name(overmap, origin) | ||
else: | ||
for overmap in json["overmaps"]: | ||
parse_camp_name(overmap, origin) |