Allow puppets to have two descriptions

This commit is contained in:
Howard Abrams 2025-05-16 11:33:27 -07:00
parent 0e57870efa
commit da9927c33a
2 changed files with 18 additions and 0 deletions

View file

@ -83,6 +83,8 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
"""
Make sure we aren't left sitting down when logging out.
"""
self.execute_cmd("pose reset")
if self.db.is_sitting:
chair = self.db.is_sitting
chair.db.sitter = None

View file

@ -45,3 +45,19 @@ class Puppet(Character):
"""
self.msg("\nNo longer puppeting |c{name}|n.\n".format(name=self.key))
def return_appearance(self, viewer, **kwargs):
"""
Return one of two appearances based on if it is being puppeted or not.
Set either or both:
@set me/desc_puppeted = "A clown bouncing up and down from a box."
@set me/desc_uppuppeted = "A colorful box with a closed lid."
If either is not specified, it uses the standard description.
"""
if self.tags.get(key='puppeted', category='account'):
return self.db.desc_puppeted if self.db.desc_puppeted else self.db.desc
else:
return self.db.desc_unpuppeted if self.db.desc_unpuppeted else self.db.desc