Merge pull request #3445 from InspectorCaracal/patch-14

Update `get_display_name` docstring
This commit is contained in:
Griatch 2024-03-21 18:02:35 +01:00 committed by GitHub
commit 802fea0149
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1434,19 +1434,15 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase):
Displays the name of the object in a viewer-aware manner.
Args:
looker (TypedObject): The object or account that is looking
at/getting inforamtion for this object. If not given, `.name` will be
returned, which can in turn be used to display colored data.
looker (TypedObject): The object or account that is looking at or getting information
for this object.
Returns:
str: A name to display for this object. This can contain color codes and may
be customized based on `looker`. By default this contains the `.key` of the object,
followed by the DBREF if this user is privileged to control said object.
str: A name to display for this object. By default this returns the `.name` of the object.
Notes:
This function could be extended to change how object names appear to users in character,
but be wary. This function does not change an object's keys or aliases when searching,
and is expected to produce something useful for builders.
This function can be extended to change how object names appear to users in character,
but it does not change an object's keys or aliases when searching.
"""
return self.name