From 1853b2942904322d0892d5211aa9819a7f5ee0b5 Mon Sep 17 00:00:00 2001 From: Griatch Date: Mon, 11 Mar 2024 09:06:00 +0100 Subject: [PATCH] Re-add dbref match for find command --- evennia/commands/default/building.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/evennia/commands/default/building.py b/evennia/commands/default/building.py index adadbd9219..f4519e298e 100644 --- a/evennia/commands/default/building.py +++ b/evennia/commands/default/building.py @@ -4,11 +4,10 @@ Building and world design commands import re import typing +import evennia from django.conf import settings from django.core.paginator import Paginator from django.db.models import Max, Min, Q - -import evennia from evennia import InterruptCommand from evennia.commands.cmdhandler import generate_cmdset_providers, get_and_merge_cmdsets from evennia.locks.lockhandler import LockException @@ -3328,14 +3327,23 @@ class CmdFind(COMMAND_DEFAULT_CLASS): string = f"|w{header}|n(#{low}-#{high}{restrictions}):" res = None for res in results: - string += f"\n |g{res.get_display_name(caller)} - {res.path}|n" + string += ( + "\n " + f" |g{res.get_display_name(caller)}" + f"{res.get_extra_display_name_info(caller)} -" + f" {res.path}|n" + ) if ( "loc" in self.switches and nresults == 1 and res and getattr(res, "location", None) ): - string += f" (|wlocation|n: |g{res.location.get_display_name(caller)}|n)" + string += ( + " (|wlocation|n:" + f" |g{res.location.get_display_name(caller)}" + f"{res.get_extra_display_name_info(caller)}|n)" + ) else: string = f"|wNo Matches|n(#{low}-#{high}{restrictions}):" string += f"\n |RNo matches found for '{searchstring}'|n"