MultiLocclass

thing.t[9647]

Superclass
Tree

Subclass
Tree

Global
Objects

Property
Summary

Method
Summary

Property
Details

Method
Details

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
Floor
RoomPart
Ceiling
DefaultWall
SymPassage
SymDoor
SymPathPassage
SymStairway

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[9669]

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[9679]

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[9662]

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[9655]

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[9696]

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[9804]

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

isIn (loc)

thing.t[9821]

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[9688]

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[9838]

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[9788]

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[9761]

Move this MultiLoc into an additional location.

moveOutOf (loc)

thing.t[9774]

Remove this MultiLoc from loc.

preinitThing ( )

thing.t[9891]

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