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
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.
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.
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.
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
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.
A MultiLoc is directly in another object if it's listed in that other object's contents list.
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.
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.
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.
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.
Move this MultiLoc into an additional location.
Remove this MultiLoc from loc.
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 25/04/2024 from adv3Lite version 2.0