Various fixes from game jam

This commit is contained in:
Griatch 2019-05-14 10:33:31 +02:00
parent e6aec78cce
commit ed187ad05f
12 changed files with 45 additions and 28 deletions

View file

@ -1623,7 +1623,9 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
commonly an object or the current location. It will
be checked for the "view" type access.
**kwargs (dict): Arbitrary, optional arguments for users
overriding the call (unused by default).
overriding the call. This will be passed into
return_appearance, get_display_name and at_desc but is not used
by default.
Returns:
lookstring (str): A ready-processed look string
@ -1632,15 +1634,15 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
"""
if not target.access(self, "view"):
try:
return "Could not view '%s'." % target.get_display_name(self)
return "Could not view '%s'." % target.get_display_name(self, **kwargs)
except AttributeError:
return "Could not view '%s'." % target.key
description = target.return_appearance(self)
description = target.return_appearance(self, **kwargs)
# 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, **kwargs)
return description