Changed cmdhandler to include Session-level cmdset.
This commit is contained in:
parent
07b1e40299
commit
1e96b13920
11 changed files with 205 additions and 80 deletions
|
|
@ -1673,7 +1673,7 @@ class CmdExamine(ObjManipCommand):
|
|||
caller.execute_cmd('look %s' % obj.name)
|
||||
return
|
||||
# using callback for printing result whenever function returns.
|
||||
get_and_merge_cmdsets(obj).addCallback(get_cmdset_callback)
|
||||
get_and_merge_cmdsets(obj, self.session, self.player, obj, "session").addCallback(get_cmdset_callback)
|
||||
else:
|
||||
self.msg("You need to supply a target to examine.")
|
||||
return
|
||||
|
|
@ -1708,7 +1708,7 @@ class CmdExamine(ObjManipCommand):
|
|||
caller.msg(self.format_attributes(obj, attrname, crop=False))
|
||||
else:
|
||||
# using callback to print results whenever function returns.
|
||||
get_and_merge_cmdsets(obj).addCallback(get_cmdset_callback)
|
||||
get_and_merge_cmdsets(obj, self.session, self.player, obj, "session").addCallback(get_cmdset_callback)
|
||||
|
||||
|
||||
class CmdFind(MuxCommand):
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class PlayerCmdSet(CmdSet):
|
|||
self.add(player.CmdIC())
|
||||
self.add(player.CmdOOC())
|
||||
self.add(player.CmdCharCreate())
|
||||
self.add(player.CmdSessions())
|
||||
#self.add(player.CmdSessions())
|
||||
self.add(player.CmdWho())
|
||||
self.add(player.CmdEncoding())
|
||||
self.add(player.CmdQuit())
|
||||
|
|
|
|||
16
src/commands/default/cmdset_session.py
Normal file
16
src/commands/default/cmdset_session.py
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
This module stores session-level commands.
|
||||
"""
|
||||
from src.commands.cmdset import CmdSet
|
||||
from src.commands.default import player
|
||||
|
||||
class SessionCmdSet(CmdSet):
|
||||
"""
|
||||
Sets up the unlogged cmdset.
|
||||
"""
|
||||
key = "DefaultSession"
|
||||
priority = 0
|
||||
|
||||
def at_cmdset_creation(self):
|
||||
"Populate the cmdset"
|
||||
self.add(player.CmdSessions())
|
||||
Loading…
Add table
Add a link
Reference in a new issue