Regionclass | travel.t[1940], dynamicRegion.t[153]

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

Modified in dynamicRegion.t[153]:
Modifications to Region to work safely with DynamicRegion

`class Region : object`

Superclass Tree (in declaration order)

`Region`
`object`

Subclass Tree

`Region`
`DynamicRegion`
`SenseRegion`

Global Objects

(none)

Summary of Properties

`extraScopeItems familiar fastGoTo regions roomList rooms`

Summary of Methods

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

Properties

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

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[2019]`

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[2184]`

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[1946]`

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[1989]`

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[1996]`

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[2092]`

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

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

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[2074]`

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[1969]`

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[184]`

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

`isIn (region)` | `travel.t[1952], dynamicRegion.t[158]`

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[158]:
A DynamicRegion cannot contain other regions [DYNAMIC REGION EXTENSION]

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

Is this Region either itself region or contained within in region

`makeRegionLists ( )` | `travel.t[2005], dynamicRegion.t[172]`

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[172]:
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[2190]`

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

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

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

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

Carry out after notifications on the region

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

Carry out before notifications on the region

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

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

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

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

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

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

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

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

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

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[2061]`

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 ( )` | `travel.t[2025]`

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

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

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

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

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 15/03/2023 from adv3Lite version 1.6.1