Vehicleclass

travel.t[6818], en_us.t[2810]

Superclass
Tree

Subclass
Tree

Global
Objects

Property
Summary

Method
Summary

Property
Details

Method
Details

A Vehicle is a special type of nested room that moves instead of the actor in response to travel commands. When an actor in a vehicle types, for example, “go north,” the vehicle moves north, not the actor.

In most cases, a Vehicle should multiply inherit from one of the other nested room subclasses to make it more specialized. For example, a bicycle might inherit from Chair, so that actors can sit on the bike.

Note that because Vehicle inherits from NestedRoom, the OUT direction in the vehicle by default means what it does in NestedRoom - specifically, getting out of the vehicle. This is appropriate for vehicles where we’d describe passengers as being inside the vehicle, such as a car or a boat. However, if the vehicle is something you ride on, like a horse or a bike, it’s probably more appropriate for OUT to mean “ride the vehicle out of the enclosing room.” To get this effect, simply override the “out” property and set it to nil; this will prevent the NestedRoom definition from being inherited, which will make us look for the OUT location of the enclosing room as the travel destination.

Modified in en_us.t[2810]:
English-specific Vehicle changes

class Vehicle :   NestedRoom Traveler

Superclass Tree   (in declaration order)

Vehicle
NestedRoom
BasicLocation
Thing
VocabObject
`                                         object [Traveler](../object/Traveler.html) [TravelMessageHandler](../object/TravelMessageHandler.html)                         object`

Subclass Tree  

(none)

Global Objects  

(none)

Summary of Properties  

aboardVehicleListerObj getTravelerActors getTravelerMotiveActors out

Inherited from NestedRoom :
bulkCapacity exitDestination mustMoveIntoProp roomName stagingLocations

Inherited from BasicLocation :
cannotGoThatWayMsg defaultPosture effectiveFollowLocation listWithActorInTable mustDefaultPostureProp notTravelReadyMsg roomLocation roomNotifyList roomTravelPreCond

Inherited from Thing :
actorInAName actorInName actorInPrep actorIntoName actorOutOfName actorOutOfPrep aDisambigName allStates aName brightness bulk canBeHeard canBeSeen canBeSmelled canBeTouched canMatchHer canMatchHim canMatchIt canMatchThem circularlyInMessage collectiveGroup collectiveGroups contents contentsListed contentsListedInExamine contentsListedSeparately contentsLister descContentsLister described disambigEquivName disambigName distantDesc distantInitSpecialDesc distantSpecialDesc distinguishers dummyName equivalenceKey equivalentGrouper equivalentGrouperClass equivalentGrouperTable esEndingPat explicitVisualSenseInfo getState globalParamName holdingIndex iesEndingPat initDesc initNominalRoomPartLocation initSpecialDesc inlineContentsLister isEquivalent isHer isHim isInInitState isKnown isLikelyCommandTarget isListedAboardVehicle isMassNoun isPlural isProperName isQualifiedName isThingConstructed isTopLevel listName listWith location lookInLister moved name nameDoes nameSays nameSees objectNotifyList objInPrep obscuredInitSpecialDesc obscuredSpecialDesc owner patElevenEighteen patIsAlpha patLeadingTagOrQuote patOfPhrase patOneLetterAnWord patOneLetterWord patSingleApostropheS patTagOrQuoteChar patUpperOrDigit patVowelY pluralDisambigName pluralName pronounSelector roomDarkName seen sightPresence sightSize smellPresence smellSize soundPresence soundSize specialContentsLister specialDesc specialDescBeforeContents specialDescListWith specialDescOrder specialNominalRoomPartLocation suppressAutoSeen takeFromNotInMessage theDisambigName theName theNamePossNoun tmpAmbient_ tmpAmbientFill_ tmpAmbientWithin_ tmpFillMedium_ tmpObstructor_ tmpObstructorWithin_ tmpPathIsIn_ tmpTrans_ tmpTransWithin_ touchPresence touchSize verbCan verbCannot verbCant verbEndingSD verbEndingSEd verbEndingSMessageBuilder_ verbMust verbToCome verbToDo verbToGo verbToLeave verbToSay verbToSee verbWill verbWont weight

Inherited from VocabObject :
canResolvePossessive disambigPromptOrder pluralOrder vocabLikelihood vocabWords weakTokens

Summary of Methods  

checkMovingTravelerInto forEachTravelingActor getLocPushTraveler getLocTraveler isActorTraveling travelerName travelerPreCond

Inherited from NestedRoom :
cannotMoveActorOutOf cannotMoveActorToStagingLocation checkActorInStagingLocation checkActorOutOfNested checkActorReadyToEnterNestedRoom checkMovingActorInto chooseStagingLocation defaultStagingLocation disembarkRoom dobjFor(GetOutOf) dobjFor(Take) getExtraScopeItems isOwnedBy isStagingLocationKnown makeStandingUp mapPushTravelIobj removeFromNested roomTravelPreCond tryMovingIntoNested tryRemovingFromNested

Inherited from BasicLocation :
actorInGroupPrefix actorInGroupSuffix actorIsFamiliar actorKnowsDestination actorTravelingWithin addRoomNotifyItem cannotGoShowExits cannotGoThatWay cannotGoThatWayInDark cannotTravel checkStagingLocation checkTravelerDirectlyInRoom dispatchRoomDaemon enteringRoom getDropDestination getNominalActorContainer getNominalDropDestination getRoomNotifyList getStatuslineExitsHeight isActorTravelReady leavingRoom listWithActorIn removeRoomNotifyItem roomActorHereDesc roomActorPostureDesc roomActorStatus roomActorThereDesc roomAfterAction roomBeforeAction roomDarkTravel roomDesc roomListActorPosture roomOkayPostureChange showStatuslineExits travelerArriving travelerLeaving tryMakingDefaultPosture tryMakingTravelReady wouldBeLitFor

Inherited from Thing :
acceptCommand addAllContents addDirectConnections addObjectNotifyItem addToContents addToSenseInfoTable adjustLookAroundTable adjustThrowDestination afterAction afterTravel allContents aNameFrom aNameObj aNameOwnerLoc announceDefaultObject appendHeldContents atmosphereList baseMoveInto basicExamine basicExamineFeel basicExamineListen basicExamineSmell basicExamineTaste beforeAction beforeTravel buildContainmentPaths cacheAmbientInfo cacheSenseInfo cacheSensePath canBeHeardBy canBeSeenBy canBeSensed canBeSmelledBy canBeTouchedBy canDetailsBeSensed canHear canMatchPronounType canMoveViaPath cannotReachObject cannotSeeSmellSource cannotSeeSoundSource canOwn canSee canSmell canThrowViaPath canTouch canTouchViaPath checkBulkChange checkBulkChangeWithin checkMoveViaPath checkThrowViaPath checkTouchViaPath childInName childInNameGen childInNameWithOwner childInRemoteName clearSenseInfo cloneForMultiInstanceContents cloneMultiInstanceContents conjugateRegularVerb connectionTable construct contentsInFixedIn countDisambigName countListName countName countNameFrom countNameOwnerLoc darkRoomContentsLister defaultDistantDesc defaultObscuredDesc desc directionForConnector distantSmellDesc distantSoundDesc dobjFor(AskAbout) dobjFor(AskFor) dobjFor(AskVague) dobjFor(AttachTo) dobjFor(Attack) dobjFor(AttackWith) dobjFor(Board) dobjFor(Break) dobjFor(Burn) dobjFor(BurnWith) dobjFor(Clean) dobjFor(CleanWith) dobjFor(Climb) dobjFor(ClimbDown) dobjFor(ClimbUp) dobjFor(Close) dobjFor(Consult) dobjFor(ConsultAbout) dobjFor(CutWith) dobjFor(Detach) dobjFor(DetachFrom) dobjFor(Dig) dobjFor(DigWith) dobjFor(Doff) dobjFor(Drink) dobjFor(Drop) dobjFor(Eat) dobjFor(Enter) dobjFor(EnterOn) dobjFor(Examine) dobjFor(Extinguish) dobjFor(Fasten) dobjFor(FastenTo) dobjFor(Feel) dobjFor(Flip) dobjFor(Follow) dobjFor(GetOffOf) dobjFor(GiveTo) dobjFor(GoThrough) dobjFor(JumpOff) dobjFor(JumpOver) dobjFor(Kiss) dobjFor(LieOn) dobjFor(Light) dobjFor(ListenTo) dobjFor(Lock) dobjFor(LockWith) dobjFor(LookBehind) dobjFor(LookIn) dobjFor(LookThrough) dobjFor(LookUnder) dobjFor(Move) dobjFor(MoveTo) dobjFor(MoveWith) dobjFor(Open) dobjFor(PlugIn) dobjFor(PlugInto) dobjFor(Pour) dobjFor(PourInto) dobjFor(PourOnto) dobjFor(Pull) dobjFor(Push) dobjFor(PushTravel) dobjFor(PutBehind) dobjFor(PutIn) dobjFor(PutOn) dobjFor(PutUnder) dobjFor(Read) dobjFor(Remove) dobjFor(Screw) dobjFor(ScrewWith) dobjFor(Search) dobjFor(Set) dobjFor(SetTo) dobjFor(ShowTo) dobjFor(SitOn) dobjFor(Smell) dobjFor(StandOn) dobjFor(Strike) dobjFor(Switch) dobjFor(TakeFrom) dobjFor(TalkTo) dobjFor(Taste) dobjFor(TellAbout) dobjFor(TellVague) dobjFor(Throw) dobjFor(ThrowAt) dobjFor(ThrowDir) dobjFor(ThrowTo) dobjFor(Turn) dobjFor(TurnOff) dobjFor(TurnOn) dobjFor(TurnTo) dobjFor(TurnWith) dobjFor(TypeLiteralOn) dobjFor(TypeOn) dobjFor(Unfasten) dobjFor(UnfastenFrom) dobjFor(Unlock) dobjFor(UnlockWith) dobjFor(Unplug) dobjFor(UnplugFrom) dobjFor(Unscrew) dobjFor(UnscrewWith) dobjFor(Wear) examineListContents examineListContentsWith examineSpecialContents examineStatus failCheck feelDesc fillMedium findOpaqueObstructor findTouchObstructor forEachConnectedContainer forEachContainer fromPOV getAllForTakeFrom getAllPathsTo getAnnouncementDistinguisher getBagAffinities getBagsOfHolding getBestDistinguisher getBulk getBulkWithin getCarryingActor getCommonContainer getCommonDirectContainer getConnectedContainers getConnectorTo getContentsForExamine getDestName getEncumberingBulk getEncumberingWeight getHitFallDestination getIdentityObject getInScopeDistinguisher getListedContents getMovePathTo getNoise getNominalOwner getObjectNotifyList getOdor getOutermostRoom getOutermostVisibleRoom getRoomPartLocation getStateWithInfo getThrowPathTo getTouchPathTo getTravelConnector getVisualSenseInfo getWeight hasCollectiveGroup hideFromAll hideFromDefault initializeEquivalent initializeLocation initializeThing inRoomName iobjFor(AttachTo) iobjFor(AttackWith) iobjFor(BurnWith) iobjFor(CleanWith) iobjFor(CutWith) iobjFor(DetachFrom) iobjFor(DigWith) iobjFor(FastenTo) iobjFor(GiveTo) iobjFor(LockWith) iobjFor(MoveWith) iobjFor(PlugInto) iobjFor(PourInto) iobjFor(PourOnto) iobjFor(PutBehind) iobjFor(PutIn) iobjFor(PutOn) iobjFor(PutUnder) iobjFor(ScrewWith) iobjFor(ShowTo) iobjFor(TakeFrom) iobjFor(ThrowAt) iobjFor(ThrowTo) iobjFor(TurnWith) iobjFor(UnfastenFrom) iobjFor(UnlockWith) iobjFor(UnplugFrom) iobjFor(UnscrewWith) isComponentOf isDirectlyIn isHeldBy isIn isInFixedIn isListed isListedInContents isListedInInventory isListedInRoomPart isLookAroundCeiling isNominallyIn isNominallyInRoomPart isOccludedBy isOrIsIn isShipboard isVocabEquivalent itIs itNom itObj itPossAdj itPossNoun itVerb listCardinality localDirectionLinkForConnector lookAround lookAroundPov lookAroundWithin lookAroundWithinContents lookAroundWithinDesc lookAroundWithinName lookAroundWithinSense lookAroundWithinShowExits lookInDesc mainExamine mainMoveInto mapPushTravelHandlers mapPushTravelHandlers mapPushTravelHandlers mapPushTravelHandlers mapPushTravelHandlers meetsObjHeld mergeSenseInfo mergeSenseInfoTable moveInto moveIntoForTravel moveIntoNotifyPath mustMoveObjInto nameIs nameIsnt nameVerb normalizePath notePromptByOwnerLoc notePromptByPossAdj noteSeenBy notifyInsert notifyMoveInto notifyMoveViaPath notifyRemove obscuredDesc obscuredSmellDesc obscuredSoundDesc pluralNameFrom processThrow propHidesProp propWithPresent putInName receiveDrop remoteDesc remoteInitSpecialDesc remoteRoomContentsLister remoteSpecialDesc removeFromContents removeObjectNotifyItem restoreLocation roomContentsLister roomDaemon roomDarkDesc roomFirstDesc roomRemoteDesc saveLocation selectPathTo sendNotifyInsert sendNotifyRemove senseAmbientMax senseInfoTable senseObj sensePathFromWithin sensePathFromWithout sensePathToContents sensePathToLoc sensePresenceList setAllSeenBy setContentsSeenBy setGlobalParamName setVisualSenseInfo shineFromWithin shineFromWithout shineOnContents shineOnLoc showDistantSpecialDesc showDistantSpecialDescInContents showInventoryContents showInventoryItem showInventoryItemCounted showListItem showListItemCounted showListItemCountedGen showListItemGen showObjectContents showObscuredSpecialDesc showObscuredSpecialDescInContents showRemoteSpecialDesc showRemoteSpecialDescInContents showSpecialDesc showSpecialDescInContents showSpecialDescInContentsWithInfo showSpecialDescWithInfo showWornItem showWornItemCounted smellDesc smellHereDesc soundDesc soundHereDesc specialDescList specialPathFrom statusName stopThrowViaPath superHidesSuper tasteDesc thatNom thatObj theNameFrom theNameObj theNameOwnerLoc theNameWithOwner throwTargetCatch throwTargetHitWith throwViaPath transmitAmbient transSensingIn transSensingOut traversePath tryHolding tryImplicitRemoveObstructor tryMovingObjInto useInitDesc useInitSpecialDesc useSpecialDesc useSpecialDescInContents useSpecialDescInRoom useSpecialDescInRoomPart verbEndingEs verbEndingIes verbEndingS verbToHave verbWas verifyFollowable verifyInsert verifyMoveTo verifyRemove whatIf whatIfHeldBy withVisualSenseInfo

Inherited from VocabObject :
addToDictionary expandPronounList filterResolveList getFacets inheritVocab initializeVocab initializeVocabWith matchName matchNameCommon matchNameDisambig throwNoMatchForLocation throwNoMatchForPossessive throwNothingInLocation

Inherited from Traveler :
canTravelVia checkDirectlyInRoom describeArrival describeDeparture describeNpcArrival describeNpcDeparture explainNoTravelVia getNotifyTable isTravelerCarrying travelerLocName travelerRemoteLocName travelerSeenBy travelerTravelTo travelerTravelWithin

Inherited from TravelMessageHandler :
getNominalTraveler sayArriving sayArrivingDir sayArrivingDownStairs sayArrivingLocally sayArrivingThroughPassage sayArrivingUpStairs sayArrivingViaPath sayDeparting sayDepartingDir sayDepartingDownStairs sayDepartingLocally sayDepartingThroughPassage sayDepartingUpStairs sayDepartingViaPath sayTravelingRemotely

Properties  

aboardVehicleListerObj

travel.t[6998]

the lister object we use to display the list of actors aboard, in arrival and departure messages for the vehicle

getTravelerActorsOVERRIDDEN

travel.t[6957]

Get the actors involved in the travel. This is a list consisting of all of the actors contained within the vehicle.

getTravelerMotiveActorsOVERRIDDEN

travel.t[6964]

there are no self-motive actors in a vehicle - the vehicle is doing the travel, and the actors within are just moving along with it as cargo

outOVERRIDDEN

travel.t[6887]

An OUT command while within a vehicle could mean one of two things: either to GET OUT of the vehicle, or to ride/drive the vehicle out of its enclosing location.

There’s no good way of guessing which meaning the player intends, so we have to choose one or the other. We choose the ride/drive interpretation as the default, for two reasons. First, it seems to be what most players expect. Second, the other interpretation leaves no standard way of expressing the ride/drive meaning. We return nil here to indicate to the OUT action that we want the enclosing location’s ‘out’ connector to be used while an actor is in the vehicle.

For some vehicles, it might be more appropriate for OUT to mean GET OUT. In these cases, simply override this so that it returns nestedRoomOut.

Methods  

checkMovingTravelerInto (room, allowImplicit)OVERRIDDEN

travel.t[6979]

Check, using pre-condition rules, that the traveler is in the given room, moving the traveler to the room if possible.

forEachTravelingActor (func)OVERRIDDEN

travel.t[6944]

invoke a callback for each actor traveling with us

getLocPushTraveler (trav, obj)OVERRIDDEN

travel.t[6899]

Get the “location push traveler” - this is the traveler when a push-travel command is performed by a traveler within this location. If the object we’re trying to push is within me, use the contained traveler, since the contained traveler must be trying to push the object around directly. If the object isn’t inside me, then we’re presumably trying to use the vehicle to push around the object, so the traveler is the vehicle or something containing the vehicle.

getLocTraveler (trav, conn)OVERRIDDEN

travel.t[6824]

When a traveler is in a vehicle, and the traveler performs a travel command, the vehicle is what changes location; the contained traveler simply stays put while the vehicle moves.

isActorTraveling (actor)OVERRIDDEN

travel.t[6941]

Determine if an actor is traveling with me. The normal base class implementation works, but it’s more efficient just to check to see if the actor is inside this object than to construct the entire nested contents list just to check to see if the actor’s in that list.

travelerName (arriving)

en_us.t[2815]

Display the name of the traveler, for use in an arrival or departure message.

travelerPreCond (conn)OVERRIDDEN

travel.t[6973]

Traveler preconditions for the vehicle. By default, we add no preconditions of our own, but specific vehicles might want to override this. For example, a car might want to require that the doors are closed, the engine is running, and the seatbelts are fastened before it can travel.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3