Skip to content

Commit

Permalink
Merge pull request #3093 from scribblecrumb/release-bugfixes
Browse files Browse the repository at this point in the history
[BUGFIX] New cat moon event crashfix
  • Loading branch information
anjubatus authored Dec 2, 2024
2 parents f144b6e + 26bdc03 commit bdb543b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions resources/dicts/events/new_cat/general.json
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@
"old_name",
"clancat",
"status:warrior",
"backstory:former_clancat_backstories"
"backstory:refugee1,guided4,retired_leader,ostracized_warrior,disgraced1,disgraced2,disgraced3,otherclan1,otherclan2,otherclan3,otherclan4"
]
],
"other_clan": {
Expand All @@ -619,7 +619,7 @@
"old_name",
"clancat",
"status:warrior",
"backstory:former_clancat_backstories"
"backstory:refugee1,guided4,retired_leader,ostracized_warrior,disgraced1,disgraced2,disgraced3,otherclan1,otherclan2,otherclan3,otherclan4"
]
],
"injury": [
Expand Down
11 changes: 7 additions & 4 deletions scripts/utility.py
Original file line number Diff line number Diff line change
Expand Up @@ -501,11 +501,14 @@ def create_new_cat_block(
for _tag in attribute_list:
match = re.match(r"backstory:(.+)", _tag)
if match:
stor = [
x for x in match.group(1).split(",") if x in BACKSTORIES["backstories"]
]
bs_list = [x for x in match.group(1).split(",")]
stor = []
for story in bs_list:
if story in BACKSTORIES["backstories"]:
stor.append(story)
elif story in BACKSTORIES["backstory_categories"]:
stor.extend(BACKSTORIES["backstory_categories"][story])
bs_override = True
chosen_backstory = choice(stor)
break

# KITTEN THOUGHT
Expand Down

0 comments on commit bdb543b

Please sign in to comment.