Fixed a number of bugs
This commit is contained in:
parent
1a85809655
commit
b09e0d6d8f
2 changed files with 10 additions and 4 deletions
|
|
@ -116,9 +116,11 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
|
||||||
if not line or line.strip() == "":
|
if not line or line.strip() == "":
|
||||||
return line
|
return line
|
||||||
elif match(r"^\|[bm][a-z].*", line):
|
elif match(r"^\|[bm][a-z].*", line):
|
||||||
|
logger.info(f"Adding The! {line}")
|
||||||
return "The " + line
|
return "The " + line
|
||||||
elif match(r"^\|[A-z][a-z].*", line):
|
elif match(r"^\|[A-z][a-z].*", line):
|
||||||
return line[0:1] + line[2].upper() + line[3:]
|
logger.info(f"Capitalizes: {line}")
|
||||||
|
return line[0:2] + line[2].upper() + line[3:]
|
||||||
else:
|
else:
|
||||||
return line[0].upper() + line[1:]
|
return line[0].upper() + line[1:]
|
||||||
|
|
||||||
|
|
@ -189,7 +191,10 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
|
||||||
This replaces the weird, auto-generated name with the
|
This replaces the weird, auto-generated name with the
|
||||||
character's actual name.
|
character's actual name.
|
||||||
"""
|
"""
|
||||||
letter = self.search('letter', location=self)
|
letter = self.search('letter', location=self, quiet=True)
|
||||||
|
if letter and isinstance(letter, list) and len(letter) > 0:
|
||||||
|
letter = letter[0]
|
||||||
|
|
||||||
if letter:
|
if letter:
|
||||||
text = sub(r"My dear [^,]*", f"My dear {self.name}", letter.db.inside)
|
text = sub(r"My dear [^,]*", f"My dear {self.name}", letter.db.inside)
|
||||||
letter.db.inside = text
|
letter.db.inside = text
|
||||||
|
|
|
||||||
|
|
@ -103,8 +103,9 @@ class Producer(Object):
|
||||||
Create a configurable consumable, given to picker.
|
Create a configurable consumable, given to picker.
|
||||||
"""
|
"""
|
||||||
consumable = spawn({
|
consumable = spawn({
|
||||||
"typeclass": self.db.make_class or kwargs['type']
|
"typeclass": self.db.make_class or (kwargs['type']
|
||||||
if 'type' in kwargs else "typeclasses.consumables.Consumable",
|
if 'type' in kwargs else
|
||||||
|
"typeclasses.consumables.Consumable"),
|
||||||
"key": self.db.make_name,
|
"key": self.db.make_name,
|
||||||
"aliases": self.db.make_aliases,
|
"aliases": self.db.make_aliases,
|
||||||
"desc": routput(self.db.make_desc),
|
"desc": routput(self.db.make_desc),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue