PlugAttachableclass
PlugAttachable is a mix-in class for use in conjunction with either SimpleAttachable or NearbyAttachable, enabling the commands PLUG X INTO Y, UNPLUG X FROM Y, PLUG X IN and UNPLUG X, treating ATTACH and DETACH commands as equivalent to these, and describing an object’s attachments as being plugged into it.
class
PlugAttachable
: object
Superclass Tree (in declaration order)
PlugAttachable
` object`
Subclass Tree
(none)
Global Objects
(none)
Summary of Properties
` alreadyAttachedMsg
alreadyPluggedInMsg
attachmentLister
cannotBeAttachedMsg
cannotPlugInAnyMoreMsg
canPlugIntoMe
isPlugable
isPluggedIn
needsExplicitSocket
notAttachedMsg
notAttachedToThatMsg
okayAttachMsg
okayDetachFromMsg
okayDetachMsg
socketCapacity
`
Summary of Methods
` dobjFor(PlugIn)
dobjFor(PlugInto)
dobjFor(Unplug)
dobjFor(UnplugFrom)
iobjFor(AttachTo)
iobjFor(PlugInto)
makePlugged
`
Properties
alreadyAttachedMsg
no description available
alreadyPluggedInMsg
no description available
attachmentLister
Objects attached to this object should be described as plugged into it, so we need to use the appropriate lister.
cannotBeAttachedMsg
Make sure we don’t exceed our socketCapacity if the player uses ATTACH TO rather than PLUG INTO; use the check method for PlugInto.
cannotPlugInAnyMoreMsg
If plugging anything else into us would exceed our socketCapacity, rule out the action with an appropriate message,
canPlugIntoMe
A PlugAttachable can have other things plugged into it.
isPlugable
A PlugAttachable can be plugged into things.
isPluggedIn
Is this item plugged in to anything?
needsExplicitSocket
Plugable objects could either be implemented so that an explicit socket needs to be specified (e.g. PLUG CABLE INTO SOCKET) or so that the socket can be left unspecified (e.g. PLUG TV IN). For the former case, make this property true; for the latter, make it nil.
notAttachedMsg
no description available
notAttachedToThatMsg
no description available
okayAttachMsg
Note that we’re now plugged in.
okayDetachFromMsg
Note that we’re no longer plugged in to anything.
okayDetachMsg
If plugging/unplugging this item requires an explicit socket to plug into/unplug from, then detach this item from whatever it’s currently attached to.
socketCapacity
If this object represents the socket side of a plug-and-socket relationship, then the socketCapacity defines the total number of items that can be plugged into it once. By default we’ll assume that a socket can only have one thing plugged into it at a time, but this can readily be overridded for items that can take more.
Methods
dobjFor(PlugIn)
no description available
dobjFor(PlugInto)
no description available
dobjFor(Unplug)
no description available
dobjFor(UnplugFrom)
no description available
iobjFor(AttachTo)
no description available
iobjFor(PlugInto)
no description available
makePlugged (stat)
Note whether we’re plugged our unplugged.
Adv3Lite Library Reference Manual
Generated on 15/03/2023 from adv3Lite version 1.6.1