SymConnectorclass

symconn.t[259]

Superclass
Tree

Subclass
Tree

Global
Objects

Property
Summary

Method
Summary

Property
Details

Method
Details

A Symmetrical Connector is a special type of TravelConnector between rooms that can be traversed in either direction and that, optionally, can largely set itself up so that if the dir property of room1 points to this SymConnector, the reverse dir property of room2 also points to this SymConnector. [SYMCOMM EXTENSION]

SymConnector is a type of TravelConnector (from which it descends by inheritance). A SymConnector can be traversed in both directions, and defining a SymConnector on a direction property of one room automatically attaches it to the reverse direction property of the room to which it leads. Otherwise, a SymConnector behaves much like any other TravelConnector, and can be used to define travel barriers or the side-effects of travel in much the same way.

Internally a SymConnector defines a room1 property and a room2 property, room1 and room2 being the two rooms reciprocally connected by the SymConnector. The room1 and room2 can be set by the extension at preinit if the connector’s destination is specified, but it’s probably clearer and safer to explictly set the room1 and room2 properties.

class SymConnector :   TravelConnector

Superclass Tree   (in declaration order)

SymConnector
TravelConnector
`                 object`

Subclass Tree  

SymConnector
SymPassage
SymDoor
SymPathPassage
SymStairway

Global Objects  

(none)

Summary of Properties  

destination dirName inRoom1 inRoom2 isDestinationKnown isOpen room1 room1Dir room2 room2Dir rooms

Inherited from TravelConnector :
isConnectorApparent isConnectorListed PushTravelVia suppressTravelDescForPushTravel transmitsLight travelBarriers traversalTime traversed traversedBy

Summary of Methods  

byRoom execTravel getDestination initConnector

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

Properties  

destinationOVERRIDDEN

symconn.t[311]

Our notional destination (if this is defined it will be copied to room2 at preinit). [SYMCOMM EXTENSION]

dirName

symconn.t[288]

The name of our direction of travel from the point of view of the player character depending on whether the pc is in room1 or room2.

inRoom1

symconn.t[410]

Test whether the player character is in our room1

inRoom2

symconn.t[413]

Test whether the player character is in our room2

isDestinationKnown

symconn.t[347]

By default the player character doesn’t start off knowing where this connector leads. Once the pc has been through the connector in either direction this becomes true on both sides of the connector. [SYMCOMM EXTENSION]

isOpenOVERRIDDEN

symconn.t[350]

A SymConnector is usually open. [SYMCOMM EXTENSION]

room1

symconn.t[265]

The room from/to which this SymConnector leads. Note we can leave this to be set up by our initConnector() method. [SYMCOMM EXTENSION]

room1Dir

symconn.t[276]

The direction an actor needs to travel in to travel via us from room1. This is set up in Room initObj();

room2

symconn.t[270]

The room to/from which this SymConnector leads. [SYMCOMM EXTENSION]

room2Dir

symconn.t[282]

The direction an actor needs to travel in to travel via us from room2. This is set up in Room initObj();

rooms

symconn.t[356]

The rooms property provides an alternative and slightly shorthand way of defining our two rooms. If defined, it must contain exactlty two rooms in the order [room1, room2].

Methods  

byRoom (args)

symconn.t[416]

return a or b depending on which room the player char is in

execTravel (actor, traveler, conn)OVERRIDDEN

symconn.t[318]

Execute travel through this connector. The difference for the SYMCOMM EXTENSION is that an actor travelling through this connector ends up knowing where both sides lead to.

getDestination (origin)OVERRIDDEN

symconn.t[293]

Our destination depends on our origin. [SYMCOMM EXTENSION]

initConnector (loc, dir)

symconn.t[363]

Initialize this SymConnector by setting up its room1 and room2 properties if they are not already defined. This method is normally called from the preinitThing() method of the room that first defines this connector. [SYMCOMM EXTENSION]

Adv3Lite Library Reference Manual
Generated on 15/03/2023 from adv3Lite version 1.6.1