mirror of
https://github.com/evennia/evennia.git
synced 2026-03-30 12:37:16 +02:00
Made builders and above see #dbrefs in various admin commands.
This commit is contained in:
parent
7b80572bae
commit
24c733f7cb
1 changed files with 25 additions and 1 deletions
|
|
@ -240,7 +240,31 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
|
|||
|
||||
# main methods
|
||||
|
||||
## methods inherited from the database object (overload them here)
|
||||
def get_display_name(self, looker, **kwargs):
|
||||
"""
|
||||
Displays the name of the object in a viewer-aware manner.
|
||||
|
||||
Args:
|
||||
looker (TypedObject): The object or player that is looking
|
||||
at/getting inforamtion for this object.
|
||||
|
||||
Returns:
|
||||
name (str): A string containing the name of the object,
|
||||
including the DBREF if this user is privileged to control
|
||||
said 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.
|
||||
|
||||
"""
|
||||
if self.locks.check_lockstring(looker, "pperm(Builders)"):
|
||||
return "{}(#{})".format(self.name, self.id)
|
||||
return self.name
|
||||
|
||||
|
||||
def search(self, searchdata,
|
||||
global_search=False,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue