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:
Griatch 2015-09-27 13:05:29 +02:00
parent 5429ede5f7
commit 2743f98fb0
10 changed files with 116 additions and 199 deletions

View file

@ -458,7 +458,7 @@ class DefaultPlayer(PlayerDB):
Notes:
Extra keywords are ignored, but are allowed in call in
order to make API more consistent with
objects.models.TypedObject.search.
objects.objects.DefaultObject.search.
"""
# handle me, self and *me, *self
@ -467,7 +467,7 @@ class DefaultPlayer(PlayerDB):
if searchdata.lower() in ("me", "*me", "self", "*self",):
return self
matches = self.__class__.objects.player_search(searchdata)
matches = _AT_SEARCH_RESULT(self, searchdata, matches, global_search=True,
matches = _AT_SEARCH_RESULT(matches, self, query=searchdata,
nofound_string=nofound_string,
multimatch_string=multimatch_string)
if matches and return_puppet: