Fixed a rare conditional bug affecting Exits with custom cmdsets on them.
This commit is contained in:
parent
95d672763b
commit
1565ac3a72
2 changed files with 16 additions and 5 deletions
|
|
@ -171,11 +171,14 @@ class CmdSetHandler(object):
|
||||||
for snum, cmdset in enumerate(self.cmdset_stack):
|
for snum, cmdset in enumerate(self.cmdset_stack):
|
||||||
num = snum
|
num = snum
|
||||||
mergetype = self.mergetype_stack[snum]
|
mergetype = self.mergetype_stack[snum]
|
||||||
|
permstring = "non-perm"
|
||||||
|
if cmdset.permanent:
|
||||||
|
permstring = "perm"
|
||||||
if mergetype != cmdset.mergetype:
|
if mergetype != cmdset.mergetype:
|
||||||
mergetype = "%s^" % (mergetype)
|
mergetype = "%s^" % (mergetype)
|
||||||
string += "\n %i: <%s (%s, prio %i)>: %s" % \
|
string += "\n %i: <%s (%s, prio %i, %s)>: %s" % \
|
||||||
(snum, cmdset.key, mergetype,
|
(snum, cmdset.key, mergetype,
|
||||||
cmdset.priority, cmdset)
|
cmdset.priority, permstring, cmdset)
|
||||||
mergelist.append(str(snum))
|
mergelist.append(str(snum))
|
||||||
string += "\n"
|
string += "\n"
|
||||||
|
|
||||||
|
|
@ -183,11 +186,14 @@ class CmdSetHandler(object):
|
||||||
mergetype = self.mergetype_stack[-1]
|
mergetype = self.mergetype_stack[-1]
|
||||||
if mergetype != self.current.mergetype:
|
if mergetype != self.current.mergetype:
|
||||||
merged_on = self.cmdset_stack[-2].key
|
merged_on = self.cmdset_stack[-2].key
|
||||||
mergetype = "custom %s on %s" % (mergetype, merged_on)
|
mergetype = "custom %s on cmdset '%s'" % (mergetype, merged_on)
|
||||||
if mergelist:
|
if mergelist:
|
||||||
string += " <Merged %s (%s, prio %i)>: %s" % ("+".join(mergelist), mergetype, self.current.priority, self.current)
|
string += " <Merged %s (%s, prio %i)>: %s" % ("+".join(mergelist), mergetype, self.current.priority, self.current)
|
||||||
else:
|
else:
|
||||||
string += " <%s (%s, prio %i)>: %s" % (self.current.key, mergetype, self.current.priority,
|
permstring = "non-perm"
|
||||||
|
if self.current.permanent:
|
||||||
|
permstring = "perm"
|
||||||
|
string += " <%s (%s, prio %i, %s)>: %s" % (self.current.key, mergetype, self.current.priority, permstring,
|
||||||
", ".join(cmd.key for cmd in sorted(self.current, key=lambda o:o.key)))
|
", ".join(cmd.key for cmd in sorted(self.current, key=lambda o:o.key)))
|
||||||
return string.strip()
|
return string.strip()
|
||||||
|
|
||||||
|
|
@ -270,6 +276,9 @@ class CmdSetHandler(object):
|
||||||
# store the path permanently
|
# store the path permanently
|
||||||
cmdset.permanent = True
|
cmdset.permanent = True
|
||||||
storage = self.obj.cmdset_storage
|
storage = self.obj.cmdset_storage
|
||||||
|
if not storage:
|
||||||
|
storage = ["", cmdset.path]
|
||||||
|
else:
|
||||||
storage.append(cmdset.path)
|
storage.append(cmdset.path)
|
||||||
self.obj.cmdset_storage = storage
|
self.obj.cmdset_storage = storage
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
|
|
@ -561,6 +561,8 @@ class CmdDestroy(MuxCommand):
|
||||||
string += delobj(str(dbref))
|
string += delobj(str(dbref))
|
||||||
else:
|
else:
|
||||||
string += delobj(objname)
|
string += delobj(objname)
|
||||||
|
else:
|
||||||
|
string += delobj(objname)
|
||||||
if string:
|
if string:
|
||||||
caller.msg(string.strip())
|
caller.msg(string.strip())
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue