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.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, CmdTutorial)
|
CmdUse, CmdPush, CmdPull)
|
||||||
from commands.misc import CmdLight
|
from commands.misc import CmdLight
|
||||||
|
from typeclasses.tutorial import CmdTutorial
|
||||||
from commands.wizards import CmdGM, CmdSpell, CmdGMTrigger, CmdMakeCocktail
|
from commands.wizards import CmdGM, CmdSpell, CmdGMTrigger, CmdMakeCocktail
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,16 +39,6 @@ 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.
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,10 @@ def articlize_character(character, capitalize=False):
|
||||||
else:
|
else:
|
||||||
article = "a"
|
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
|
return character
|
||||||
elif match(r"^\|[bm][aeiou]", character):
|
elif match(r"^\|[A-z][aeiou]", character):
|
||||||
return f"{article}n " + character
|
return f"{article}n " + character
|
||||||
else:
|
else:
|
||||||
return f"{article} " + character
|
return f"{article} " + character
|
||||||
|
|
|
||||||
|
|
@ -80,11 +80,41 @@ class TutorialState(Enum):
|
||||||
SAY = 8
|
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):
|
class CmdShoo(Command):
|
||||||
"""
|
"""
|
||||||
End the tutorial by shooing the bird away.
|
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"
|
key = "shoo"
|
||||||
|
locks = "holds()"
|
||||||
|
|
||||||
def func(self):
|
def func(self):
|
||||||
self.obj.do_end_tutorial(self.caller)
|
self.obj.do_end_tutorial(self.caller)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue