A special Traveler class for travel involving pushing an object from one room to another. This class encapsulates the object being pushed and the actual Traveler performing the travel.
For the most part, we refer Traveler methods to the underlying Traveler. We override a few methods to provide special handling.
Modified in en_us.t:
English-specific PushTraveler changes
PushTraveler : object
Superclass Tree (in declaration order)
Summary of Properties
Summary of Methods
the underlying Traveler - this is the real Traveler that will move to a new location
Can we travel via the given connector? We'll ask our underlying traveler first, and if that succeeds, we'll ask the object we're pushing.
Explain why the given travel is not possible. If our underlying traveler raised the objection, let it explain; otherwise, let our pushed object explain.
by default, send everything to the underlying Traveler
When an actor is pushing an object from one room to another, show its name with an additional clause indicating the object being moved along with us.
travelerTravelTo (dest, connector, backConnector)
Travel to a new location. We'll run the normal travel routine for the underlying real traveler; then, if we ended up in a new location, we'll move the object being pushed to the traveler's new location.
Perform local travel, between nested rooms within a top-level location. By default, we simply don't allow pushing objects between nested rooms.
To allow pushing an object between nested rooms, override this in parallel with travelerTravelTo(). Note that you'll have to call travelerTravelWithin() on the underlying traveler (which will generally be the actor), and you'll probably want to set up a new set of notifiers parallel to beforeMovePushable() and movePushable(). You'll probably particularly need to customize the report in your parallel for movePushable() - the default ("you push x into the area") isn't very good when nested rooms are involved, and you'll probably want something more specific.
TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3