MultiLoc class | thing.t[10027]

A MultiLoc is an object that can exist in several locations at once. MultiLoc is a mix-in class that should be used in conjunction with Thing or a Thing-derived class.

`class MultiLoc : object`

Superclass Tree (in declaration order)

`MultiLoc`
`object`

Subclass Tree

`MultiLoc`
`DSCon`
`DSDoor`
`SymDoor`
`DSPassage`
`SymPassage`
`DSPathPassage`
`SymPathPassage`
`DSStairway`
`SymStairway`
`Floor`
`MultiScenItem`
`RoomPart`
`Ceiling`
`DefaultWall`

Global Objects

`bodyParts`

Summary of Properties

`exceptions initialLocationClass initialLocationList locationList`

Summary of Methods

`addToLocations isDirectlyIn isIn isInitiallyIn location moveInto moveIntoAdd moveOutOf preinitThing`

Properties

`exceptions` | `thing.t[10049]`

A list of locations this object is not to be present in. This is intended mainly to allow certain rooms to be excepted from a specified region.

`initialLocationClass` | `thing.t[10059]`

If the initialLocationClass property is defined, then this MultiLoc is initially located in every instance of this class. Note that this would be in addition to the locations defined in the locationList class and would likewise be subject to anything defined in the exceptions property.

`initialLocationList` | `thing.t[10042]`

A list of the locations this object is to start out in. Locations may be specified as Things, Rooms or Regions, or as some mix of all three.

`locationList` | `thing.t[10035]`

A list of the locations this object is currently present in. If this property is defined at the start of the game and initialLocationList isn't, then this list will be copied to initialLocationList, and so can be specified by users in exactly the same way.

Methods

`addToLocations ( )` | `thing.t[10076]`

In Preinit, add this MultiLoc into the contents list of every item in its locationList and every object of class initialLocationClass (if this is not nil) and then remove it from the contents list of every item in its exceptions list.

`isDirectlyIn (loc)` | `thing.t[10184]`

A MultiLoc is directly in another object if it's listed in that other object's contents list.

`isIn (loc)` | `thing.t[10201]`

A MultiLoc is in another object either if it's directly in that object or if one of the items in its location list is in that object.

`isInitiallyIn (obj)` | `thing.t[10068]`

Test an object for inclusion in our initial location list. By default, we'll simply return true to include every object. We return true by default so that an instance can merely specify a value for initialLocationClass in order to place this object in every instance of the given class.

`location ( )` | `thing.t[10218]`

For certain purposes, such as sense path calculations, a Multiloc needs a notional location. We assume the enquiry is made from the perspective of the current actor, or, failing that, the player char, so we return the current actor's (or the player char's) current location if the MultiLoc is present there, or the last place where the MultiLoc was seen otherwise. The intention is to select the most currently significant location where we're present.

`moveInto (loc)` | `thing.t[10168]`

To move a MultiLoc into a single location, first remove it from every location in its location list, then add it to the single location it's now in.

`moveIntoAdd (loc)` | `thing.t[10141]`

Move this MultiLoc into an additional location.

`moveOutOf (loc)` | `thing.t[10154]`

Remove this MultiLoc from loc.

`preinitThing ( )` | `thing.t[10271]`

If we're a MultiLoc we don't want to carry out any of the normal preinitialization related to our location.

Adv3Lite Library Reference Manual
Generated on 03/07/2024 from adv3Lite version 2.1