Add display_name and disambiguation_tag for dynamic naming.

This commit is contained in:
Jonathan Piacenti 2015-06-20 14:37:05 -05:00
parent a5887d23e2
commit 1822b01086
6 changed files with 75 additions and 50 deletions

View file

@ -1476,6 +1476,15 @@ class ExitCommand(command.Command):
# No shorthand error message. Call hook.
self.obj.at_failed_traverse(self.caller)
def get_extra_info(self, caller, **kwargs):
"""
Shows a bit of information on where the exit leads.
"""
if self.obj.destination:
return " (exit to %s)" % self.obj.destination.display_name(caller)
else:
return " (%s)" % self.obj.display_name(caller)
#
# Base Exit object
#