Region class | travel.t[2491], dynamicRegion.t[154]

A Region is an object representing several rooms or even several other Regions.

Modified in dynamicRegion.t[154]:
Modifications to Region to work safely with DynamicRegion [DYNAMICREGION EXTENSION

`class Region : object`

Superclass Tree (in declaration order)

`Region`
`object`

Subclass Tree

`Region`
`DynamicRegion`
`DynamicSenseRegion`
`SenseRegion`
`DynamicSenseRegion`

Global Objects

(none)

Summary of Properties

`briefGoTo extraScopeItems familiar fastGoTo regions roomList rooms`

Summary of Methods

`addExtraScopeItems addToContents addToRoomList allRegions isCurrentlyWithin isFamiliar isIn isOrIsIn makeRegionLists moveMLIntoAdd moveMLOutOf notifyAfter notifyBefore regionAfterAction regionAfterTravel regionBeforeAction regionBeforeTravel regionDaemon removeFromContents setFamiliarRooms travelerEntering travelerLeaving`

Properties

`briefGoTo` | `travel.t[2756]`

Should the briefGoTo option be used in this region (i.e. traveling from one room in the region to another is all done in one turn without the need for CONTINUE and without intervening rooms descriptions, even if several steps are involved)? Note that the value of this setting has no effect if gameMain.briefGoTo is true, since then the briedGoTo setting is always in effect.

`extraScopeItems` | `travel.t[2675]`

A list of items that should be added to the standard scope list for actions carried out in any room in this region.

`familiar` | `travel.t[2570]`

Is the player char familiar with every room in this region. This should be set to true for a region whose geography the PC starts out familiar with, such as the layout of his own house.

`fastGoTo` | `travel.t[2746]`

Should the fastGoTo option be used in this region (i.e. traveling from one room in the region to another is all done in one turn without the need for CONTINUE, even if several steps are involved)? Note that the value of this setting has no effect if gameMain.fastGoTo is true, since then the fastGoTo setting is always in effect.

`regions` | `travel.t[2497]`

This region can optionally be in one or more regions. The regions property hold the region or a the list of regions I'm in.

`roomList` | `travel.t[2540]`

A list of all the rooms in this region. This is built automatically at preinit and shouldn't be altered by the user/author.

`rooms` | `travel.t[2547]`

A user-defined list of the rooms in this region. At Preinit this will be used along with the regions property of any rooms to build the roomList of this Region.

Methods

`addExtraScopeItems (action)` | `travel.t[2654]`

Put extra items in scope when action is carried out in any room in this region.

`addToContents (obj, vec?)` | `travel.t[2609]`

To add an object to our contents we need to add it to the contents of every room in this region. If the optional vec parameter is supplied it must be a vector; the rooms will then be added to the vector as well. The vec parameter is primarily for use by the MultiLoc class.

`addToRoomList (rm)` | `travel.t[2636]`

Add an additional room (passed as the rm parameter) to our list of rooms. This method is intended for internal library use at PreInit only.

`allRegions ( )` | `travel.t[2520]`

A list of all the regions this Region is within; in addition to any regions this Region is directly in (defined on its regions property) this will include all the regions it's indirectly in (i.e. any regions the regions it's in are in and so forth).

`isCurrentlyWithin (region)` | `dynamicRegion.t[185]`

Tests whether this room is currently contained within region in the sense that all our rooms are also in region. [DYNAMIC REGION EXTENSION]

`isFamiliar (prop, =, &, familiar)` | `travel.t[2577]`

For games that track different familiarity on different Actors, we can call this method with &xxxFamiliart to farm out the answer to the appropriate xxxFamiliar property, which we'll need to define on this region.

`isIn (region)` | `travel.t[2503], dynamicRegion.t[159]`

A Room can't be in another Room or a Thing, but it can notionally be in a Region, so we check to see if we're in the list of our regions.

Modified in dynamicRegion.t[159]:
A DynamicRegion cannot contain other regions [DYNAMIC REGION EXTENSION]

`isOrIsIn (region)` | `travel.t[2509]`

Is this Region either itself region or contained within in region

`makeRegionLists ( )` | `travel.t[2556], dynamicRegion.t[173]`

Build the list of regions in all the rooms in this this region by going through every room defined in the roomList and adding us to its list of regions. Note that this is provided as an alternative way to define what rooms start out in which regions.

Modified in dynamicRegion.t[173]:
A Region is not allowed to be part of a DynamicRegion, so clear out any DynamicRegions from our list of Regions at PreInit. [DYNAMIC REGION EXTENSION]

`moveMLIntoAdd (ml)` | `travel.t[2762]`

Move a MultiLoc (ml) into this region, by moving it into every room in this Region.

`moveMLOutOf (ml)` | `travel.t[2771]`

Move a MultiLoc (ml) out of this region, by moving it out of every room in the Region.

`notifyAfter ( )` | `travel.t[2710]`

Carry out after notifications on the region

`notifyBefore ( )` | `travel.t[2690]`

Carry out before notifications on the region

`regionAfterAction ( )` | `travel.t[2724]`

Method called just after an action has taken place in this region.

`regionAfterTravel (traveler, connector)` | `travel.t[2737]`

Method called just after travel has taken place in this region (when traveler has just traveled via connector).

`regionBeforeAction ( )` | `travel.t[2707]`

This method is called just before an action takes places in this region.

`regionBeforeTravel (traveler, connector)` | `travel.t[2730]`

This method is called just before travel takes places in this region (when traveler is about to travel via connector).

`regionDaemon ( )` | `travel.t[2781]`

The regionDaemon method is executed on ever region in which the player character is currently located. By default we call the region's doScript() method so that the if the region is mixed in with an EventList class, that EventList can be executed.

`removeFromContents (obj, vec?)` | `travel.t[2623]`

To remove an object from our contents we need to remove it from the contents of every room in the region. If the optional vec parameter is supplied it must be a vector; the rooms will then be removed from the vector as well.

`setFamiliarRooms (prop, =, &, familiar)` | `travel.t[2586]`

Go through all the rooms in this region setting them to familiar if the region is familiar.

`travelerEntering (traveler, origin)` | `travel.t[2687]`

This method is invoked when traveler is about to enter this region from origin (the room traveled from.

`travelerLeaving (traveler, dest)` | `travel.t[2681]`

This method is invoked when traveler is about to leave this region and go to dest (the destination room).

Adv3Lite Library Reference Manual
Generated on 08/12/2025 from adv3Lite version 2.2.2