From 17179a7edd456d947b1a7aeec8919e4abda1fd84 Mon Sep 17 00:00:00 2001 From: InspectorCaracal Date: Wed, 5 Oct 2022 17:31:55 -0600 Subject: [PATCH] royal we --- evennia/utils/verb_conjugation/pronouns.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/evennia/utils/verb_conjugation/pronouns.py b/evennia/utils/verb_conjugation/pronouns.py index 0c350c688d..d15a993585 100644 --- a/evennia/utils/verb_conjugation/pronouns.py +++ b/evennia/utils/verb_conjugation/pronouns.py @@ -383,10 +383,6 @@ def pronoun_to_viewpoints( # check if pronoun maps to multiple options and differentiate # but don't allow invalid differentiators - if is_iter(source_gender): - gender = gender if gender in source_gender else source_gender[0] - else: - gender = source_gender if is_iter(source_type): pronoun_type = pronoun_type if pronoun_type in source_type else source_type[0] else: @@ -397,6 +393,18 @@ def pronoun_to_viewpoints( else: viewpoint = target_viewpoint + # special handling for the royal "we" + if is_iter(source_gender): + gender_opts = list(source_gender) + else: + gender_opts = [source_gender] + if viewpoint == "1st person": + # make sure plural is always an option when converting to 1st person + # it doesn't matter if it's in the list twice, so don't bother checking + gender_opts.append("plural") + # if the gender is still not in the extended options, fall back to source pronoun's default + gender = gender if gender in gender_opts else gender_opts[0] + # step down into the mapping viewpoint_map = PRONOUN_MAPPING[viewpoint]