Made cmdhandler respect an explicit True/False setting.
This commit is contained in:
parent
3f1a887841
commit
5863ef29a8
2 changed files with 7 additions and 3 deletions
|
|
@ -188,9 +188,11 @@ def get_and_merge_cmdsets(caller, session, player, obj,
|
||||||
lobj.locks.check(caller, 'call', no_superuser_bypass=True))]
|
lobj.locks.check(caller, 'call', no_superuser_bypass=True))]
|
||||||
for cset in local_obj_cmdsets:
|
for cset in local_obj_cmdsets:
|
||||||
#This is necessary for object sets, or we won't be able to
|
#This is necessary for object sets, or we won't be able to
|
||||||
# separate the command sets from each other in a busy room.
|
# separate the command sets from each other in a busy room. We
|
||||||
|
# only keep the setting if duplicates were set to False/True
|
||||||
|
# explicitly.
|
||||||
cset.old_duplicates = cset.duplicates
|
cset.old_duplicates = cset.duplicates
|
||||||
cset.duplicates = True
|
cset.duplicates = True if cset.duplicates is None else cset.duplicates
|
||||||
returnValue(local_obj_cmdsets)
|
returnValue(local_obj_cmdsets)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.log_trace()
|
logger.log_trace()
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,9 @@ class CmdSet(object):
|
||||||
key = "Unnamed CmdSet"
|
key = "Unnamed CmdSet"
|
||||||
mergetype = "Union"
|
mergetype = "Union"
|
||||||
priority = 0
|
priority = 0
|
||||||
duplicates = False
|
# if None, the cmdhandler will switch to True for objects and stay False otherwise.
|
||||||
|
# Explicitly set True/False will be kept.
|
||||||
|
duplicates = None
|
||||||
key_mergetypes = {}
|
key_mergetypes = {}
|
||||||
no_exits = False
|
no_exits = False
|
||||||
no_objs = False
|
no_objs = False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue