PushTravelerclass
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)
PushTraveler
` object`
Subclass Tree
(none)
Global Objects
(none)
Summary of Properties
Summary of Methods
canTravelVia
construct
explainNoTravelVia
propNotDefined
travelerName
travelerTravelTo
travelerTravelWithin
Properties
obj_
the object being pushed
traveler_
the underlying Traveler - this is the real Traveler that will move to a new location
Methods
canTravelVia (connector, dest)
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)
no description available
explainNoTravelVia (connector, dest)
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])
by default, send everything to the underlying Traveler
travelerName (arriving)
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.
travelerTravelWithin (actor, dest)
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