mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 14:26:30 +01:00
Cleaned up the batch processors (both cmd- and code processor) and homogenized their interfaces and APIs. Also test-ran the example codes and fixed some bugs.
This commit is contained in:
parent
e114c33d8a
commit
4d8fc05157
6 changed files with 373 additions and 316 deletions
|
|
@ -504,6 +504,7 @@ class ObjectDB(TypedObject):
|
|||
"""
|
||||
# This is an important function that must always work.
|
||||
# we use a different __getattribute__ to avoid recursive loops.
|
||||
|
||||
if from_obj:
|
||||
try:
|
||||
from_obj.at_msg_send(message, self)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ def handle_search_errors(emit_to_obj, ostring, results, global_search=False):
|
|||
dbrefs instead of only numbers)
|
||||
"""
|
||||
if not results:
|
||||
emit_to_obj.emit_to("Could not find '%s'." % ostring)
|
||||
emit_to_obj.msg("Could not find '%s'." % ostring)
|
||||
return None
|
||||
if len(results) > 1:
|
||||
# we have more than one match. We will display a
|
||||
|
|
@ -47,8 +47,8 @@ def handle_search_errors(emit_to_obj, ostring, results, global_search=False):
|
|||
if show_dbref:
|
||||
dbreftext = "(#%i)" % result.id
|
||||
string += "\n %i-%s%s%s" % (num+1, result.name,
|
||||
dbreftext, invtext)
|
||||
emit_to_obj.emit_to(string)
|
||||
dbreftext, invtext)
|
||||
emit_to_obj.msg(string.strip())
|
||||
return None
|
||||
else:
|
||||
return results[0]
|
||||
|
|
@ -101,4 +101,3 @@ def object_multimatch_parser(ostring):
|
|||
return (None, ostring)
|
||||
except IndexError:
|
||||
return (None, ostring)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue