mirror of
https://github.com/evennia/evennia.git
synced 2026-04-05 07:27:17 +02:00
Made examine command more verbose about the cmdset stack and just which cmdsets go into the currently merged set. This meant a change to merged sets where they store their component sets as a variable "merged_from".
This commit is contained in:
parent
1cabcae771
commit
c321ccb332
5 changed files with 44 additions and 20 deletions
|
|
@ -229,11 +229,14 @@ def get_and_merge_cmdsets(caller, session, player, obj,
|
|||
cmdsets = yield sorted(tempmergers.values(), key=lambda x: x.priority)
|
||||
|
||||
# Merge all command sets into one, beginning with the lowest-prio one
|
||||
cmdset = cmdsets.pop(0)
|
||||
for merging_cmdset in cmdsets:
|
||||
cmdset = cmdsets[0]
|
||||
for merging_cmdset in cmdsets[1:]:
|
||||
#print "<%s(%s,%s)> onto <%s(%s,%s)>" % (merging_cmdset.key, merging_cmdset.priority, merging_cmdset.mergetype,
|
||||
# cmdset.key, cmdset.priority, cmdset.mergetype)
|
||||
cmdset = yield merging_cmdset + cmdset
|
||||
# store the full sets for diagnosis
|
||||
cmdset.merged_from = cmdsets
|
||||
# cache
|
||||
_CMDSET_MERGE_CACHE[mergehash] = cmdset
|
||||
else:
|
||||
cmdset = None
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue