Fix character display bug due to faulty logic
Also add periods to the end of lists.
This commit is contained in:
parent
166bfed218
commit
6fed2e88c3
2 changed files with 8 additions and 8 deletions
|
|
@ -105,7 +105,7 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
|
|||
letter = spawn({
|
||||
"typeclass": "typeclasses.readables.Letter",
|
||||
"key": "letter",
|
||||
"desc": "A letter of familiar penmanship stuffed in an envelope.",
|
||||
"desc": "An envelope with a letter of familiar penmanship.",
|
||||
})[0]
|
||||
letter.db.inside = READ_LETTER.format(self.name.capitalize())
|
||||
letter.location = self
|
||||
|
|
@ -203,7 +203,7 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
|
|||
return self.gendered_text(pre_desc + \
|
||||
reg_desc.replace('|wYou see:|n',
|
||||
'|S has') + \
|
||||
post_desc)
|
||||
post_desc + '.')
|
||||
|
||||
def at_pre_move(self, destination, *args, **kwargs):
|
||||
"""
|
||||
|
|
|
|||
|
|
@ -101,11 +101,11 @@ class Room(ObjectParent, ExtendedRoom, ContribRPRoom):
|
|||
else:
|
||||
also = ''
|
||||
|
||||
if num_chars > 2:
|
||||
if num_chars > 1:
|
||||
return f"You {also}see the following characters:" + \
|
||||
captialize_characters(char_list)
|
||||
|
||||
if num_chars > 1:
|
||||
if num_chars > 0:
|
||||
character = char_list.strip()
|
||||
if character.startswith('|'):
|
||||
comp_char = character[2:].lower()
|
||||
|
|
@ -113,17 +113,17 @@ class Room(ObjectParent, ExtendedRoom, ContribRPRoom):
|
|||
comp_char = character.lower()
|
||||
|
||||
if match(r"an? |the ", comp_char):
|
||||
return f"You {also}see {character}"
|
||||
return f"You {also}see {character}."
|
||||
elif match(r"[aeiou]", comp_char):
|
||||
return f"You {also}see an {character}"
|
||||
return f"You {also}see an {character}."
|
||||
else:
|
||||
return f"You {also}see a {character}"
|
||||
return f"You {also}see a {character}."
|
||||
return ''
|
||||
|
||||
def get_display_things(self, looker, *args, **kwargs):
|
||||
std_msg = super().get_display_things(looker, pose=False)
|
||||
if std_msg:
|
||||
return std_msg.replace('|wYou see:|n', 'You notice')
|
||||
return std_msg.replace('|wYou see:|n', 'You notice') + '.'
|
||||
else:
|
||||
return ''
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue