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({
|
letter = spawn({
|
||||||
"typeclass": "typeclasses.readables.Letter",
|
"typeclass": "typeclasses.readables.Letter",
|
||||||
"key": "letter",
|
"key": "letter",
|
||||||
"desc": "A letter of familiar penmanship stuffed in an envelope.",
|
"desc": "An envelope with a letter of familiar penmanship.",
|
||||||
})[0]
|
})[0]
|
||||||
letter.db.inside = READ_LETTER.format(self.name.capitalize())
|
letter.db.inside = READ_LETTER.format(self.name.capitalize())
|
||||||
letter.location = self
|
letter.location = self
|
||||||
|
|
@ -203,7 +203,7 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
|
||||||
return self.gendered_text(pre_desc + \
|
return self.gendered_text(pre_desc + \
|
||||||
reg_desc.replace('|wYou see:|n',
|
reg_desc.replace('|wYou see:|n',
|
||||||
'|S has') + \
|
'|S has') + \
|
||||||
post_desc)
|
post_desc + '.')
|
||||||
|
|
||||||
def at_pre_move(self, destination, *args, **kwargs):
|
def at_pre_move(self, destination, *args, **kwargs):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
|
|
@ -101,11 +101,11 @@ class Room(ObjectParent, ExtendedRoom, ContribRPRoom):
|
||||||
else:
|
else:
|
||||||
also = ''
|
also = ''
|
||||||
|
|
||||||
if num_chars > 2:
|
if num_chars > 1:
|
||||||
return f"You {also}see the following characters:" + \
|
return f"You {also}see the following characters:" + \
|
||||||
captialize_characters(char_list)
|
captialize_characters(char_list)
|
||||||
|
|
||||||
if num_chars > 1:
|
if num_chars > 0:
|
||||||
character = char_list.strip()
|
character = char_list.strip()
|
||||||
if character.startswith('|'):
|
if character.startswith('|'):
|
||||||
comp_char = character[2:].lower()
|
comp_char = character[2:].lower()
|
||||||
|
|
@ -113,17 +113,17 @@ class Room(ObjectParent, ExtendedRoom, ContribRPRoom):
|
||||||
comp_char = character.lower()
|
comp_char = character.lower()
|
||||||
|
|
||||||
if match(r"an? |the ", comp_char):
|
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):
|
elif match(r"[aeiou]", comp_char):
|
||||||
return f"You {also}see an {character}"
|
return f"You {also}see an {character}."
|
||||||
else:
|
else:
|
||||||
return f"You {also}see a {character}"
|
return f"You {also}see a {character}."
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
def get_display_things(self, looker, *args, **kwargs):
|
def get_display_things(self, looker, *args, **kwargs):
|
||||||
std_msg = super().get_display_things(looker, pose=False)
|
std_msg = super().get_display_things(looker, pose=False)
|
||||||
if std_msg:
|
if std_msg:
|
||||||
return std_msg.replace('|wYou see:|n', 'You notice')
|
return std_msg.replace('|wYou see:|n', 'You notice') + '.'
|
||||||
else:
|
else:
|
||||||
return ''
|
return ''
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue