PushTravelerclasstravel.t[3314], en_us.t[2842]

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[2842]:
English-specific PushTraveler changes

class PushTraveler :   object

Superclass Tree   (in declaration order)


Subclass Tree  


Global Objects  


Summary of Properties  

obj_  traveler_ 

Summary of Methods  

canTravelVia  construct  explainNoTravelVia  propNotDefined  travelerName  travelerTravelTo  travelerTravelWithin 



the object being pushed

the underlying Traveler - this is the real Traveler that will move to a new location


canTravelVia (connector, dest)travel.t[3400]

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.

construct (obj, traveler)travel.t[3315]
no description available

explainNoTravelVia (connector, dest)travel.t[3412]
Explain why the given travel is not possible. If our underlying traveler raised the objection, let it explain; otherwise, let our pushed object explain.

propNotDefined (prop, [args])travel.t[3421]
by default, send everything to the underlying Traveler

travelerName (arriving)en_us.t[2848]
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.t[3337]
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.

travelerTravelWithin (actor, dest)travel.t[3389]
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