Skip to content

Commit

Permalink
Update CharacterService to handle relationship sets properly
Browse files Browse the repository at this point in the history
  • Loading branch information
KiloOscarSix committed May 25, 2024
1 parent ea688b3 commit 4b2451b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CharacterService_ren.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,14 @@ def get_relationship(
if not hasattr(character, "relationships"):
character.relationships = {}

if isinstance(target.relationships, set):
target.relationships = {r: Relationship.FWB for r in target.relationships}

if isinstance(character.relationships, set):
character.relationships = {
r: Relationship.FWB for r in character.relationships
}

if (
target.relationships.get(character, Relationship.STRANGER).value
> character.relationships.get(target, Relationship.STRANGER).value
Expand Down

0 comments on commit 4b2451b

Please sign in to comment.