Removed SEARCH_AT_MULTIMATCH_INPUT and SEARCH_AT_MULTIMATCH_CMD settings and connected functions - these are no longer individually overloadable. SEARCH_AT_RESULT function now handles all error reporting. Also added SEARCH_MULTIMATCH_SEPARATOR to make it easy to replace the character used to separate multi-matches (1-box, 2-box is using '-' by default), in response to #795. Also moved the default SEARCH_AT_RESULT function from the cmdparser to evennia.utils.utils.
This commit is contained in:
parent
5429ede5f7
commit
2743f98fb0
10 changed files with 116 additions and 199 deletions
|
|
@ -400,18 +400,22 @@ class Command(object):
|
|||
|
||||
def get_extra_info(self, caller, **kwargs):
|
||||
"""
|
||||
Display some extra information that may help distinguish this command from others, for instance,
|
||||
in a disambiguity prompt.
|
||||
Display some extra information that may help distinguish this
|
||||
command from others, for instance, in a disambiguity prompt.
|
||||
|
||||
If this command is a potential match in an ambiguous situation, one distinguishing
|
||||
feature may be its attachment to a nearby object, so we include this if available.
|
||||
If this command is a potential match in an ambiguous
|
||||
situation, one distinguishing feature may be its attachment to
|
||||
a nearby object, so we include this if available.
|
||||
|
||||
Args:
|
||||
caller (TypedObject): The caller who typed an ambiguous term handed to the search function.
|
||||
caller (TypedObject): The caller who typed an ambiguous
|
||||
term handed to the search function.
|
||||
|
||||
Returns:
|
||||
A string with identifying information to disambiguate the object, conventionally with a preceding space.
|
||||
A string with identifying information to disambiguate the
|
||||
object, conventionally with a preceding space.
|
||||
|
||||
"""
|
||||
if hasattr(self, 'obj') and self.obj != caller:
|
||||
return " (%s)" % self.obj.get_display_name(caller)
|
||||
return " (%s)" % self.obj.get_display_name(caller).strip()
|
||||
return ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue