Fix bug with tutorial. Oops.
This commit is contained in:
parent
a954dcfbdf
commit
e9b0dd7614
4 changed files with 35 additions and 13 deletions
|
|
@ -22,8 +22,9 @@ from evennia.contrib.rpg.character_creator.character_creator import ContribCharg
|
|||
from commands.sittables import CmdNoSitStand
|
||||
from commands.everyone import (CmdTake, CmdThink, CmdSay,
|
||||
CmdWhisper, CmdRead, CmdEat, CmdDrink,
|
||||
CmdUse, CmdPush, CmdPull, CmdTutorial)
|
||||
CmdUse, CmdPush, CmdPull)
|
||||
from commands.misc import CmdLight
|
||||
from typeclasses.tutorial import CmdTutorial
|
||||
from commands.wizards import CmdGM, CmdSpell, CmdGMTrigger, CmdMakeCocktail
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -39,16 +39,6 @@ def speech_effect(speech, verb, target, effects):
|
|||
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):
|
||||
"""
|
||||
Use an item.
|
||||
|
|
|
|||
|
|
@ -31,9 +31,10 @@ def articlize_character(character, capitalize=False):
|
|||
else:
|
||||
article = "a"
|
||||
|
||||
if character == "" or match(r"^\|[bm][A-Z]", character):
|
||||
logger.info(f"rooms: articlize_character({character})")
|
||||
if character == "" or match(r"^\|[A-z][A-Z]", character):
|
||||
return character
|
||||
elif match(r"^\|[bm][aeiou]", character):
|
||||
elif match(r"^\|[A-z][aeiou]", character):
|
||||
return f"{article}n " + character
|
||||
else:
|
||||
return f"{article} " + character
|
||||
|
|
|
|||
|
|
@ -80,11 +80,41 @@ class TutorialState(Enum):
|
|||
SAY = 8
|
||||
|
||||
|
||||
class CmdTutorial(Command):
|
||||
"""
|
||||
Start (or restart) the tutorial.
|
||||
|
||||
Usage:
|
||||
|
||||
|gtutorial|n
|
||||
|
||||
The |wtutorial bird|n, Bubba Joe Washington III, will re-join
|
||||
you to show you the ropes of this game. Type:
|
||||
|
||||
|gshoo|n
|
||||
|
||||
To stop the tutorial.
|
||||
"""
|
||||
key = "tutorial"
|
||||
|
||||
def func(self):
|
||||
TutorBird.do_start_tutorial(self.caller)
|
||||
|
||||
|
||||
class CmdShoo(Command):
|
||||
"""
|
||||
End the tutorial by shooing the bird away.
|
||||
|
||||
Usage:
|
||||
|
||||
|gshoo|n
|
||||
|
||||
Restart the tutorial, and bring back Bubba, using the command:
|
||||
|
||||
|gtutorial|n
|
||||
"""
|
||||
key = "shoo"
|
||||
locks = "holds()"
|
||||
|
||||
def func(self):
|
||||
self.obj.do_end_tutorial(self.caller)
|
||||
|
|
|
|||
Loading…
Reference in a new issue