mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 12:37:16 +02:00
Include a missing file for previous commit.
This commit is contained in:
parent
d76b7b0454
commit
f5ba4f6204
1 changed files with 6 additions and 3 deletions
|
|
@ -288,7 +288,8 @@ class ObjectDBManager(TypedObjectManager):
|
|||
attribute_name=None,
|
||||
typeclass=None,
|
||||
candidates=None,
|
||||
exact=True):
|
||||
exact=True,
|
||||
use_dbref=True):
|
||||
"""
|
||||
Search as an object globally or in a list of candidates and
|
||||
return results. The result is always an Object. Always returns
|
||||
|
|
@ -321,6 +322,8 @@ class ObjectDBManager(TypedObjectManager):
|
|||
used together with the `candidates` keyword to limit the
|
||||
number of possibilities. This value has no meaning if
|
||||
searching for attributes/properties.
|
||||
use_dbref (bool): If False, bypass direct lookup of a string
|
||||
on the form #dbref and treat it like any string.
|
||||
|
||||
Returns:
|
||||
matches (list): Matching objects
|
||||
|
|
@ -361,8 +364,8 @@ class ObjectDBManager(TypedObjectManager):
|
|||
candidates = [cand for cand in candidates
|
||||
if _GA(cand, "db_typeclass_path") in typeclass]
|
||||
|
||||
dbref = not attribute_name and exact and self.dbref(searchdata)
|
||||
if dbref is not None:
|
||||
dbref = not attribute_name and exact and use_dbref and self.dbref(searchdata)
|
||||
if dbref:
|
||||
# Easiest case - dbref matching (always exact)
|
||||
dbref_match = self.dbref_search(dbref)
|
||||
if dbref_match:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue