AskConnectorclasspathfind.t[314]

An AskConnector is a specialized TravelConnector that leads to more than one possible destination (e.g., two doors that lie to the east) which player needs to choose between when trying to travel in the relevant direction. If routefinding finds a route through an AskConnector, the choice will be made on the player's behalf when executing a GO TO or CONTINUE commsnd.

class AskConnector :   TravelConnector

Superclass Tree   (in declaration order)

AskConnector
        TravelConnector
                object

Subclass Tree  

(none)

Global Objects  

(none)

Summary of Properties  

destination  destTab  effectiveLocation  options  travelAction 

Inherited from TravelConnector :
isConnectorApparent  isConnectorListed  isOpen  posture  PushTravelVia  stagingLocations  suppressTravelDescForPushTravel  transmitsLight  travelBarriers  travelNotificationList  traversalTime  traversed  traversedBy 

Summary of Methods  

execTravel  findDestFor  getDestination  getDestinations 

Inherited from TravelConnector :
afterTravelNotifications  beforeTravelNotifications  canTravelerPass  checkPushTravel  checkTravelBarriers  dobjFor(GoThrough)  dobjFor(TravelVia)  exitLocation  explainTravelBarrier  getApparentDestination  getDepartingDirection  getTraveler  hasBeenTraversedBy  iobjFor(PushTravelThrough)  isConnectorVisible  isDestinationKnown  noteTraversal  sayActorFollowing  sayDeparting  sayNoDestination  sayNotInStagingLocation  setTravelPosture  travelDesc  travelVia  traversalMsg  traversalTimeFrom 

Properties  

destinationOVERRIDDENpathfind.t[326]

Our notional destination (which code may fall back on if all else fails). By default we use the first item in our options list.

destTabpathfind.t[613]
A LookUp table to cache which of our options' immediate destinations this AskConnector notionally leads to when we're on a path to any given to anu given target destination.

effectiveLocationpathfind.t[329]
Our effective location is the room we lead from.

optionspathfind.t[320]
The list of conectore (doors, passages, stairways or whatever) that lie in the direction this AskConnector leads. There should be at least two items in this list.

travelActionpathfind.t[336]
The travel action to be used if when we ask the player to choose one of our options. This defaults to TravelVia, which is suitable for just about anything, but could be overriden to GoThrough or Enter if they seen a better choice in any given case.

Methods  

execTravel (actor, traveler, conn)OVERRIDDENpathfind.t[567]

To execute our travel we first see if the player character is making the next move in response to a GOTO or CONTINUE command. If so then we select whichever of our options leads to a room on the way to our destination and choose that, executing its travelVia() method without any further intervention if we find a suitable choice. Otherwise we display a message listing our options and ask the player to choose which one to use.

findDestFor (loc, target, origin)pathfind.t[420]
Find which of the destinations led to by our options list would be on the route to target from loc and add any we find to our destTab tablle.

getDestination (origin)OVERRIDDENpathfind.t[346]
Our destination normally depends on which of our options the player chooses, but if a route finder is trying to find a route for us, our destination needs to be whichever of our options leads to the player's desired destinations. Note that the value returned by this mathod is relevant only to the poRouteFinder when it's trying to find a path or to the exit lister when deciding how to colour exits.

getDestinations (origin)pathfind.t[555]
Return a list of the rooms the connections listed in our options property lead to,

Adv3Lite Library Reference Manual
Generated on 26/02/2025 from adv3Lite version 2.2