mirror of
https://github.com/evennia/evennia.git
synced 2026-04-03 14:37:17 +02:00
Fixed a bug in @find not taking new Tag-based aliases into account.
This commit is contained in:
parent
1ba54202e8
commit
a56b16db7b
1 changed files with 6 additions and 5 deletions
|
|
@ -1874,15 +1874,16 @@ class CmdFind(MuxCommand):
|
|||
nresults = results.count()
|
||||
if not nresults:
|
||||
# no matches on the keys. Try aliases instead.
|
||||
results = ObjectDB.db_aliases.filter(db_key=searchstring)
|
||||
results = ObjectDB.objects.filter(db_tags__db_key__iexact=searchstring, db_tags__db_category__iexact="object_alias")
|
||||
#results = ObjectDB.db_aliases.filter(db_key=searchstring)
|
||||
if "room" in switches:
|
||||
results = results.filter(db_obj__db_location__isnull=True)
|
||||
results = results.filter(db_location__isnull=True)
|
||||
if "exit" in switches:
|
||||
results = results.filter(db_obj__db_destination__isnull=False)
|
||||
results = results.filter(db_destination__isnull=False)
|
||||
if "char" in switches:
|
||||
results = results.filter(db_obj__db_typeclass_path=CHAR_TYPECLASS)
|
||||
results = results.filter(db_typeclass_path=CHAR_TYPECLASS)
|
||||
# we have to parse alias -> real object here
|
||||
results = [result.db_obj for result in results]
|
||||
results = [result.dbobj for result in results]
|
||||
nresults = len(results)
|
||||
|
||||
restrictions = ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue