Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # base typeclass ( e.g. typeclasses/objects/Object )
- def get_display_name(self, looker, **kwargs):
- # grab the color code stored in db.color_code,
- # or default to "|w"
- color = self.db.color_code or "|w"
- # use the original get_display_name hook to get our name
- name = super(Object, self).get_display_name(looker, **kwargs)
- # either create a string based on self.db.modifiers, or default to an
- # empty string
- modifiers = " " + " ".join(self.db.modifiers) or ""
- return("{color}{name}|n{modifiers}".format(color=color, name=name, modifiers=modifiers))
Advertisement
Add Comment
Please, Sign In to add comment