Removed reference to target after target.at_desc. This allows the target to delete itself in response to being looked at without throwing an error.

This commit is contained in:
Trent Robbins 2016-10-02 00:49:54 -07:00 committed by Griatch
parent c5c3a9ef0a
commit 91874f5339

View file

@ -1386,9 +1386,14 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
return "Could not view '%s'." % target.get_display_name(self)
except AttributeError:
return "Could not view '%s'." % target.key
description = target.return_appearance(self)
# the target's at_desc() method.
# this must be the last reference to target so it may delete itself when acted on.
target.at_desc(looker=self)
return target.return_appearance(self)
return description
def at_desc(self, looker=None):
"""