Announce made drinks
And delete them all when they wake up in the field.
This commit is contained in:
parent
72c25bb33f
commit
c81ea8c55f
2 changed files with 14 additions and 0 deletions
|
|
@ -70,11 +70,17 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
|
|||
self.create_letter()
|
||||
self.create_ticket()
|
||||
|
||||
def delete_inv(self, typeclass):
|
||||
for obj in self.contents:
|
||||
if obj.is_typeclass(typeclass):
|
||||
obj.delete()
|
||||
|
||||
def at_post_puppet(self, **kwargs):
|
||||
if self.db.visited:
|
||||
self.msg(f"""\n“Welcome back, {self.key.capitalize()}.”\n""")
|
||||
if self.location.key == "Wyldwood Bar":
|
||||
self.msg("You wake up in a meadow with a strange dream of a bar...")
|
||||
self.delete_inv("typeclasses.drinkables.Cocktail")
|
||||
self.location = self.global_search("Frog Meadow")
|
||||
self.execute_cmd("look")
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -335,8 +335,16 @@ class Cocktail(Object):
|
|||
drink.db.effects = details.get("effects")
|
||||
drink.db.amount = Cocktail.fill_amount
|
||||
drink.location = owner
|
||||
|
||||
drink.location.msg(f"You now have a {drink.name}.")
|
||||
|
||||
theroom = drink.location.location
|
||||
char = owner.db._sdesc or owner.get_display_name(theroom)
|
||||
logger.info(drink.db.cocktail_type)
|
||||
msg = routput("The << bartender ^ barkeep ^ elf >> << passes ^ slides ^ gives ^ hands >> a {0} to {1}.",
|
||||
drink.db.cocktail_type, char)
|
||||
theroom.msg_contents(msg, exclude=owner)
|
||||
|
||||
def at_object_creation(self):
|
||||
"""
|
||||
Add the 'drink' command.
|
||||
|
|
|
|||
Loading…
Reference in a new issue