Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def at_after_traverse(self, traversing_object, source_location):
- """
- Called just after an object successfully used this object to
- traverse to another object (i.e. this object is a type of
- Exit)
- Args:
- traversing_object (Object): The object traversing us.
- source_location (Object): Where `traversing_object` came from.
- Notes:
- The target location should normally be available as `self.destination`.
- Ashlan note: This has to be defined before the rest of the code, probably it's similar for other exit hooks.
- """
- if traversing_object.db.dead:
- destination = traversing_object.search("#740", global_search=True)
- traversing_object.move_to(destination, quiet=True)
- if traversing_object.db.followed_by:
- destination = traversing_object.location
- for i in traversing_object.db.followed_by:
- i.msg("test")
- traversing_object.msg("test") # this works!
- i.move_to(destination)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement