object.at_traverse() now passes the exit being traversed as a kwarg

This commit is contained in:
Andrew Bastien 2022-07-26 12:29:40 -04:00
parent 99d300799e
commit 8b696ed2b5

View file

@ -866,6 +866,7 @@ class DefaultObject(ObjectDB, metaclass=TypeclassBase):
Keyword Args: Keyword Args:
Passed on to announce_move_to and announce_move_from hooks. Passed on to announce_move_to and announce_move_from hooks.
Exits will set the "exit" kwarg to themselves.
Returns: Returns:
result (bool): True/False depending on if there were problems with the move. result (bool): True/False depending on if there were problems with the move.
@ -2889,7 +2890,7 @@ class DefaultExit(DefaultObject):
""" """
source_location = traversing_object.location source_location = traversing_object.location
if traversing_object.move_to(target_location, move_type="traverse"): if traversing_object.move_to(target_location, move_type="traverse", exit=self):
self.at_post_traverse(traversing_object, source_location) self.at_post_traverse(traversing_object, source_location)
else: else:
if self.db.err_traverse: if self.db.err_traverse: