Advertisement
Kovitikus

Untitled

Jul 16th, 2019
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. def get_display_name(self, looker, **kwargs):
  2. """
  3. Displays the name of the object in a viewer-aware manner.
  4. Args:
  5. looker (TypedObject): The object or account that is looking
  6. at/getting inforamtion for this object.
  7. Returns:
  8. name (str): A string containing the name of the object,
  9. including the DBREF if this user is privileged to control
  10. said object.
  11. Notes:
  12. This function could be extended to change how object names
  13. appear to users in character, but be wary. This function
  14. does not change an object's keys or aliases when
  15. searching, and is expected to produce something useful for
  16. builders.
  17. """
  18. if self.locks.check_lockstring(looker, "perm(Builder)"):
  19. return f"{self.name}(#{self.id}) Combat Score: {self.db.combat_score}"
  20. return self.name + f" Combat Score: {self.db.combat_score}"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement