Made the default return_appearance use the get_display_name hook properly.

This commit is contained in:
Griatch 2015-09-02 19:16:16 +02:00
parent ce26ee0a25
commit 9f16cee0d2

View file

@ -204,7 +204,6 @@ class DefaultObject(ObjectDB):
return self.contents_cache.get(exclude=exclude) return self.contents_cache.get(exclude=exclude)
contents = property(contents_get) contents = property(contents_get)
@property @property
def exits(self): def exits(self):
""" """
@ -1264,7 +1263,7 @@ class DefaultObject(ObjectDB):
con.access(looker, "view")) con.access(looker, "view"))
exits, users, things = [], [], [] exits, users, things = [], [], []
for con in visible: for con in visible:
key = con.key key = con.get_display_name(looker)
if con.destination: if con.destination:
exits.append(key) exits.append(key)
elif con.has_player: elif con.has_player:
@ -1272,7 +1271,7 @@ class DefaultObject(ObjectDB):
else: else:
things.append(key) things.append(key)
# get description, build string # get description, build string
string = "{c%s{n\n" % self.key string = "{c%s{n\n" % self.get_display_name(looker)
desc = self.db.desc desc = self.db.desc
if desc: if desc:
string += "%s" % desc string += "%s" % desc