Persist knock and pet commands
This commit is contained in:
parent
c86d94e59e
commit
c4777ef1c2
5 changed files with 36 additions and 8 deletions
|
|
@ -9,9 +9,12 @@ class CmdKnock(Command):
|
|||
"""
|
||||
The ability to knock on something, like a door.
|
||||
|
||||
While it would be great if it could be attached to a door or some
|
||||
other exit, we need to attach this to the room.
|
||||
Usage:
|
||||
|
||||
knock
|
||||
|
||||
Uh, yeah, you'll need to make sure the ring is in the mouth of the
|
||||
door knocker.
|
||||
"""
|
||||
key = "knock"
|
||||
|
||||
|
|
@ -28,6 +31,12 @@ class CmdSetKnock(CmdSet):
|
|||
class CmdJump(Command):
|
||||
"""
|
||||
Jump or play in or around puddles.
|
||||
|
||||
Usage:
|
||||
|
||||
jump
|
||||
|
||||
You know you want to do this!
|
||||
"""
|
||||
key = "jump"
|
||||
aliases = ["play"]
|
||||
|
|
@ -43,10 +52,16 @@ class CmdSetPuddle(CmdSet):
|
|||
|
||||
class CmdThrow(Command):
|
||||
"""
|
||||
Jump or play in or around puddles.
|
||||
Throw a stick or a fish back into the water.
|
||||
|
||||
Usage:
|
||||
|
||||
throw [ object ]
|
||||
|
||||
"""
|
||||
key = "throw"
|
||||
locks = "holds(stick)"
|
||||
# locks = "cmd:holds()"
|
||||
|
||||
def func(self):
|
||||
self.obj.do_throw(self.caller)
|
||||
|
|
|
|||
|
|
@ -7,6 +7,12 @@ from commands.command import Command
|
|||
class CmdPet(Command):
|
||||
"""
|
||||
Pet a 'friendly' pet.
|
||||
|
||||
Usage:
|
||||
|
||||
pet [ <creature> ]
|
||||
|
||||
Just because you |wcan|n do this, doesn't mean the creature |wwants|n you to.
|
||||
"""
|
||||
key = "pet"
|
||||
|
||||
|
|
|
|||
|
|
@ -24,8 +24,8 @@ class CmdFly(Command):
|
|||
(those are separated by double semicolons).
|
||||
|
||||
"""
|
||||
key = "^fly"
|
||||
locks = "call:all()"
|
||||
key = "fly"
|
||||
locks = "cmd:holds()"
|
||||
|
||||
def func(self):
|
||||
self.caller.do_fly(self.args.strip())
|
||||
|
|
@ -72,6 +72,14 @@ class CmdGM(MuxCommand):
|
|||
|
||||
|
||||
class CmdSpell(Command):
|
||||
"""
|
||||
Cast one of the few spells we've created that affect others.
|
||||
|
||||
Usage:
|
||||
|
||||
spell donkey on lizardman
|
||||
"""
|
||||
|
||||
key = "spell"
|
||||
aliases = ['cast']
|
||||
locks = "cmd:perm(gm) or perm(Admin)"
|
||||
|
|
|
|||
|
|
@ -218,7 +218,7 @@ class Friendly(Pet):
|
|||
"""
|
||||
super().at_object_creation()
|
||||
|
||||
self.cmdset.add(CmdPetSet)
|
||||
self.cmdset.add(CmdPetSet, persistent=True)
|
||||
|
||||
# We have a list of actions that were spammed to the room:
|
||||
self.db.last_actions = []
|
||||
|
|
|
|||
|
|
@ -382,8 +382,7 @@ class Knocker(Object):
|
|||
]
|
||||
|
||||
def at_object_creation(self):
|
||||
super().at_object_creation()
|
||||
self.cmdset.add(CmdSetKnock)
|
||||
self.cmdset.add_default(CmdSetKnock)
|
||||
|
||||
def do_knock(self, knocker):
|
||||
if self.has("ring"):
|
||||
|
|
|
|||
Loading…
Reference in a new issue