Advertisement
Guest User

Untitled

a guest
Oct 24th, 2014
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.74 KB | None | 0 0
  1.    def return_appearance(self, pobject):
  2.         """
  3.        This is a convenient hook for a 'look'
  4.        command to call.
  5.        """
  6.         if not pobject:
  7.             return
  8.         # get and identify all objects
  9.         visible = (con for con in self.contents if con != pobject and
  10.                                                     con.access(pobject, "view")) and not con.access(pobject,"hidden")
  11.         exits, users, things = [], [], []
  12.         for con in visible:
  13.             key = con.key
  14.             if con.destination:
  15.                 exits.append(key)
  16.             elif con.has_player:
  17.                 users.append("{c%s{n" % key)
  18.             else:
  19.                 things.append(key)
  20.         # get description, build string
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement