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
isFamiliar
isIn
isOrIsIn
makeRegionLists
moveMLIntoAdd
moveMLOutOf
notifyAfter
notifyBefore
regionAfterAction
regionAfterTravel
regionBeforeAction
regionBeforeTravel
regionDaemon
removeFromContents
setFamiliarRooms
travelerEntering
travelerLeaving
Properties
A list of items that should be added to the standard scope list for actions carried out in any room in this region.
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.
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.
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.
A list of all the rooms in this region. This is built automatically at preinit and shouldn't be altered by the user/author.
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
Put extra items in scope when action is carried out in any room in this region.
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.
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.
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).
Tests whether this room is currently contained within region in the sense that all our rooms are also in region. [DYNAMIC REGION EXTENSION]
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.
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]
Is this Region either itself region or contained within in region
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]
Move a MultiLoc (ml) into this region, by moving it into every room in this Region.
Move a MultiLoc (ml) out of this region, by moving it out of every room in the Region.
Carry out after notifications on the region
Carry out before notifications on the region
Method called just after an action has taken place in this region.
Method called just after travel has taken place in this region (when traveler has just traveled via connector).
This method is called just before an action takes places in this region.
This method is called just before travel takes places in this region (when traveler is about to travel via connector).
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.
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.
Go through all the rooms in this region setting them to familiar if the region is familiar.
This method is invoked when traveler is about to enter this region from origin (the room traveled from.
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 03/07/2024 from adv3Lite version 2.1