Mixed batch of minor bug fixes and cleanups.
This commit is contained in:
parent
9520e261d8
commit
4bcd5239b5
8 changed files with 40 additions and 39 deletions
|
|
@ -120,13 +120,12 @@ def get_and_merge_cmdsets(caller):
|
|||
local_objects_cmdsets = [obj.cmdset.current
|
||||
for obj in local_objlist
|
||||
if obj.locks.check(caller, 'call', no_superuser_bypass=True)]
|
||||
|
||||
# Merge all command sets into one
|
||||
# (the order matters, the higher-prio cmdsets are merged last)
|
||||
cmdset = caller_cmdset
|
||||
for obj_cmdset in [obj_cmdset for obj_cmdset in local_objects_cmdsets if obj_cmdset]:
|
||||
# Here only, object cmdsets are merged with duplicates=True
|
||||
# (or we would never be able to differentiate between objects)
|
||||
# (or we would never be able to differentiate between same-prio objects)
|
||||
try:
|
||||
old_duplicate_flag = obj_cmdset.duplicates
|
||||
obj_cmdset.duplicates = True
|
||||
|
|
@ -306,7 +305,7 @@ def cmdhandler(caller, raw_string, unloggedin=False, testing=False):
|
|||
raise ExecSystemCommand(syscmd, sysarg)
|
||||
|
||||
# Parse the input string into command candidates
|
||||
cmd_candidates = COMMAND_PARSER(raw_string)
|
||||
cmd_candidates = COMMAND_PARSER(raw_string)
|
||||
|
||||
#string ="Command candidates"
|
||||
#for cand in cmd_candidates:
|
||||
|
|
|
|||
|
|
@ -131,10 +131,9 @@ class CmdSet(object):
|
|||
|
||||
priority- All cmdsets are always merged in pairs of two so that
|
||||
the higher set's mergetype is applied to the
|
||||
lower-priority cmdset. Evennia uses priorities from 0-10
|
||||
where 10 are used for high-priority things like comsys
|
||||
channel names and 9 for exit names in order to give
|
||||
these priority when the given command matches.
|
||||
lower-priority cmdset. Default commands have priority 0,
|
||||
high-priority ones like Exits and Channels have 10 and 9. Priorities
|
||||
can be negative as well to give default commands preference.
|
||||
|
||||
duplicates - determines what happens when two sets of equal
|
||||
priority merge. Default has the first of them in the
|
||||
|
|
|
|||
|
|
@ -1018,6 +1018,8 @@ class CmdOpen(ObjManipCommand):
|
|||
|
||||
else:
|
||||
# exit does not exist before. Create a new one.
|
||||
if not typeclass:
|
||||
typeclass = settings.BASE_EXIT_TYPECLASS
|
||||
exit_obj = create.create_object(typeclass, key=exit_name,
|
||||
location=location,
|
||||
aliases=exit_aliases)
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ class DefaultCmdSet(CmdSet):
|
|||
Implements the default command set.
|
||||
"""
|
||||
key = "DefaultMUX"
|
||||
priority = 0
|
||||
|
||||
def at_cmdset_creation(self):
|
||||
"Populates the cmdset"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue