Tutorial bird may return

By either calling the command, tutorial or by setting:

  @set character/guest_account = True
This commit is contained in:
Howard Abrams 2025-07-04 16:27:24 -07:00
parent 5bdb42042b
commit a954dcfbdf
3 changed files with 14 additions and 2 deletions

View file

@ -22,7 +22,7 @@ from evennia.contrib.rpg.character_creator.character_creator import ContribCharg
from commands.sittables import CmdNoSitStand from commands.sittables import CmdNoSitStand
from commands.everyone import (CmdTake, CmdThink, CmdSay, from commands.everyone import (CmdTake, CmdThink, CmdSay,
CmdWhisper, CmdRead, CmdEat, CmdDrink, CmdWhisper, CmdRead, CmdEat, CmdDrink,
CmdUse, CmdPush, CmdPull) CmdUse, CmdPush, CmdPull, CmdTutorial)
from commands.misc import CmdLight from commands.misc import CmdLight
from commands.wizards import CmdGM, CmdSpell, CmdGMTrigger, CmdMakeCocktail from commands.wizards import CmdGM, CmdSpell, CmdGMTrigger, CmdMakeCocktail
@ -41,6 +41,7 @@ class CharacterCmdSet(default_cmds.CharacterCmdSet):
Populates the cmdset Populates the cmdset
""" """
super().at_cmdset_creation() super().at_cmdset_creation()
self.add(CmdTutorial)
self.add(CmdNoSitStand) self.add(CmdNoSitStand)
self.add(CmdEat) self.add(CmdEat)
self.add(CmdDrink) self.add(CmdDrink)

View file

@ -10,6 +10,7 @@ from evennia.contrib.rpg.rpsystem import send_emote
from evennia.utils import iter_to_str, logger from evennia.utils import iter_to_str, logger
from typeclasses.characters import Character from typeclasses.characters import Character
from typeclasses.tutorial import TutorBird, TutorialState
from utils.word_list import routput, paragraph, choices from utils.word_list import routput, paragraph, choices
@ -38,6 +39,16 @@ def speech_effect(speech, verb, target, effects):
return (speech, speech, verb) return (speech, speech, verb)
class CmdTutorial(Command):
"""
Start (or restart) the tutorial.
"""
key = "tutorial"
def func(self):
TutorBird.do_start_tutorial(self.caller)
class CmdUse(MuxCommand): class CmdUse(MuxCommand):
""" """
Use an item. Use an item.

View file

@ -78,7 +78,7 @@ class Character(Object, GenderCharacter, ContribRPCharacter):
obj.delete() obj.delete()
def at_post_puppet(self, **kwargs): def at_post_puppet(self, **kwargs):
if self.db.visited: if self.db.visited and not self.db.guest_account:
self.msg(f"""\n“Welcome back, {self.key.capitalize()}.”\n""") self.msg(f"""\n“Welcome back, {self.key.capitalize()}.”\n""")
if self.location.key == "Wyldwood Bar": if self.location.key == "Wyldwood Bar":
self.msg("You wake up in a meadow with a strange dream of a bar...") self.msg("You wake up in a meadow with a strange dream of a bar...")