mirror of
https://github.com/evennia/evennia.git
synced 2026-03-28 18:47:16 +01:00
Made Empty cmdsets have priority -100, also changed their key from "Empty" to _EMPTY_CMDSET to make it clearer this is a special name. See also discussion in Issue 447.
This commit is contained in:
parent
acbfa57240
commit
48bfc7e54a
3 changed files with 13 additions and 7 deletions
|
|
@ -200,7 +200,7 @@ def get_and_merge_cmdsets(caller, session, player, obj,
|
|||
|
||||
# weed out all non-found sets
|
||||
cmdsets = yield [cmdset for cmdset in cmdsets
|
||||
if cmdset and cmdset.key != "Empty"]
|
||||
if cmdset and cmdset.key != "_EMPTY_CMDSET"]
|
||||
# report cmdset errors to user (these should already have been logged)
|
||||
yield [report_to.msg(cmdset.errmessage) for cmdset in cmdsets
|
||||
if cmdset.key == "_CMDSET_ERROR"]
|
||||
|
|
@ -218,6 +218,7 @@ def get_and_merge_cmdsets(caller, session, player, obj,
|
|||
tempmergers = {}
|
||||
for cmdset in cmdsets:
|
||||
prio = cmdset.priority
|
||||
#print cmdset.key, prio
|
||||
if prio in tempmergers:
|
||||
# merge same-prio cmdset together separately
|
||||
tempmergers[prio] = yield cmdset + tempmergers[prio]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue