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:
parent
c5c3a9ef0a
commit
91874f5339
1 changed files with 6 additions and 1 deletions
|
|
@ -1386,9 +1386,14 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
|
||||||
return "Could not view '%s'." % target.get_display_name(self)
|
return "Could not view '%s'." % target.get_display_name(self)
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
return "Could not view '%s'." % target.key
|
return "Could not view '%s'." % target.key
|
||||||
|
|
||||||
|
description = target.return_appearance(self)
|
||||||
|
|
||||||
# the target's at_desc() method.
|
# 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)
|
target.at_desc(looker=self)
|
||||||
return target.return_appearance(self)
|
|
||||||
|
return description
|
||||||
|
|
||||||
def at_desc(self, looker=None):
|
def at_desc(self, looker=None):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue