Made changes to examine command (to also display SessionCmdSet) and also made some more fixes.
This commit is contained in:
parent
0ea57f33a9
commit
30b7d2a405
2 changed files with 4 additions and 1 deletions
|
|
@ -224,6 +224,7 @@ def get_and_merge_cmdsets(caller, session, player, obj, callertype, sessid=None)
|
||||||
|
|
||||||
for cset in (cset for cset in local_obj_cmdsets if cset):
|
for cset in (cset for cset in local_obj_cmdsets if cset):
|
||||||
cset.duplicates = cset.old_duplicates
|
cset.duplicates = cset.old_duplicates
|
||||||
|
#print "merged set:", cmdset.key
|
||||||
returnValue(cmdset)
|
returnValue(cmdset)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1611,8 +1611,10 @@ class CmdExamine(ObjManipCommand):
|
||||||
if not (len(obj.cmdset.all()) == 1 and obj.cmdset.current.key == "Empty"):
|
if not (len(obj.cmdset.all()) == 1 and obj.cmdset.current.key == "Empty"):
|
||||||
# list the current cmdsets
|
# list the current cmdsets
|
||||||
all_cmdsets = obj.cmdset.all() + (hasattr(obj, "player") and obj.player and obj.player.cmdset.all() or [])
|
all_cmdsets = obj.cmdset.all() + (hasattr(obj, "player") and obj.player and obj.player.cmdset.all() or [])
|
||||||
|
all_cmdsets += hasattr(obj, "sessid") and hasattr(obj, "player") and obj.player.get_session(obj.sessid).cmdset.all()
|
||||||
all_cmdsets.sort(key=lambda x:x.priority, reverse=True)
|
all_cmdsets.sort(key=lambda x:x.priority, reverse=True)
|
||||||
string += "\n{wCurrent Cmdset(s){n:\n %s" % ("\n ".join("%s (prio %s)" % (cmdset.path, cmdset.priority) for cmdset in all_cmdsets))
|
string += "\n{wStored Cmdset(s){n:\n %s" % ("\n ".join("%s [%s] (prio %s)" %
|
||||||
|
(cmdset.path, cmdset.key, cmdset.priority) for cmdset in all_cmdsets))
|
||||||
|
|
||||||
# list the commands available to this object
|
# list the commands available to this object
|
||||||
avail_cmdset = sorted([cmd.key for cmd in avail_cmdset if cmd.access(obj, "cmd")])
|
avail_cmdset = sorted([cmd.key for cmd in avail_cmdset if cmd.access(obj, "cmd")])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue