Linkableclass | objects.t[3309] |
Superclass Tree | Subclass Tree | Global Objects | Property Summary | Method Summary | Property Details | Method Details |
Note that this base class doesn't provide for the management of any of the actual linked state. Subclasses are responsible for doing this. The general pattern is to create a getter/setter method pair for each bit of linked state, and in these methods refer to masterObject.xxx rather than just self.xxx.
This is useful for objects such as doors that have two separate objects representing the two sides of the door. The two sides are always linked for things like open/closed and locked/unlocked state; this can be handled by linking the two sides, and managing all state of both sides in one side designated as the master.
class
Linkable : object
Linkable
BasicOpenable
BasicDoor
Door
AutoClosingDoor
SecretDoor
HiddenDoor
Openable
Door
AutoClosingDoor
Matchbook
OpenableContainer
KeyedContainer
LockableContainer
Lockable
IndirectLockable
LockableContainer
LockableWithKey
KeyedContainer
Passage
Stairway
StairwayDown
StairwayUp
ThroughPassage
BasicDoor
Door
AutoClosingDoor
SecretDoor
HiddenDoor
ExitOnlyPassage
PathPassage
initializeThing ( ) | objects.t[3340] |
masterObject ( ) | objects.t[3324] |
We return self by default so that a linkable object can stand alone if desired. That is, a linkable object doesn't have to be part of a pair; it can just as well be a single object.