Openable class | objects.t[3484]

Openable: a mix-in class that can be combined with an object's other superclasses to make the object respond to the verbs "open" and "close." We also add some extra features for other related verbs, such as a must-be-open precondition "look in" and "board".

`class Openable : BasicOpenable`

Superclass Tree (in declaration order)

`Openable`
`BasicOpenable`
`Linkable`
`object`

Subclass Tree

`Openable`
`Door`
`AutoClosingDoor`
`Matchbook`
`OpenableContainer`
`KeyedContainer`
`LockableContainer`

Global Objects

(none)

Summary of Properties

`descContentsLister lockStatusReportable openingLister`

Inherited from `BasicOpenable` :
`cannotMoveThroughMsg cannotTouchThroughMsg initiallyOpen isOpen_ openDesc`

``

Summary of Methods

`addInteriorReachableCond dobjFor(Board) dobjFor(Close) dobjFor(GetOutOf) dobjFor(Lock) dobjFor(LockWith) dobjFor(LookIn) dobjFor(Open) dobjFor(Search) iobjFor(PourInto) iobjFor(PutIn) openStatus`

Inherited from `BasicOpenable` :
`initializeThing isOpen makeOpen tryImplicitRemoveObstructor`

Inherited from `Linkable` :
`masterObject`

Properties

`descContentsLister` | `objects.t[3492]`

Describe our contents using a special version of the contents lister, so that we add our open/closed status to the listing. The message we add is given by our openStatus method, so if all you want to change is the "it's open" status message, you can just override openStatus rather than providing a whole new lister.

`lockStatusReportable` | `objects.t[3519]`

By default, an Openable that's also a Lockable must be closed to be locked. This means that when it's open, the object is implicitly unlocked, in which case "It's unlocked" isn't worth mentioning when the description says "It's open."

`openingLister` | `objects.t[3499]`

Contents lister to use when we're opening the object. This lister shows the items that are newly revealed when the object is opened.

Methods

`addInteriorReachableCond (lst)` | `objects.t[3668]`

Generate a precondition to make sure gActor can reach the interior of the container. We consider the inside reachable if either the actor is located inside the container, or the actor is outside and the container is open.

`dobjFor(Board)` | `objects.t[3716]`

must be open to get into a nested room

`dobjFor(Close)` | `objects.t[3590]`

show any special contents as well

`dobjFor(GetOutOf)` | `objects.t[3706]`

must be open to get out of a nested room

`dobjFor(Lock)` | `objects.t[3696]`

can't lock an openable that isn't closed

`dobjFor(LockWith)` | `objects.t[3700]`

no description available

`dobjFor(LookIn)` | `objects.t[3608]`

show the default report

`dobjFor(Open)` | `objects.t[3524]`

Action handlers

`dobjFor(Search)` | `objects.t[3633]`

return the result

`iobjFor(PourInto)` | `objects.t[3689]`

make sure that our interior is reachable

`iobjFor(PutIn)` | `objects.t[3683]`

return the result

`openStatus ( )` | `objects.t[3511]`

Get our "open status" message - this is a complete sentence saying that we're open or closed. By default, in English, we just say "it's open" (adjusted for number and gender, of course).

Note that this message has to be a stand-alone independent clause. In particular note that we don't put any spacing after it, since we need to be able to add sentence-ending or clause-ending punctuation immediately after it.

TADS 3 Library Manual
Generated on 5/16/2013 from TADS version 3.1.3