Listerclass | lister.t[29], english.t[2918]

Lister is the class that displays lists of objects. This is used in room descriptions, inventory lists, and EXAMINE descriptions of objects (to show the examined object's contents).

Showing a listing is basically a function call. The reason we make a whole class out of it is that we provide a number of options, and a class is a convenient way to specify options. The options are simply defined as properties of a lister object, so to create a certain kind of list, you just set up a Lister instance with the desired options. We provide pre-defined Lister objects for the common library listing types, but games can create their own custom list types by creating their own Lister objects for different sets of options.

Modified in english.t[2918]:
List display routines

`class Lister : object`

Superclass Tree (in declaration order)

`Lister`
`object`

Subclass Tree

`Lister`
`ItemLister`
`CustomRoomLister`

Global Objects

`ExitLister finishOptionsLister fullScoreLister`

Summary of Properties

``

(none)

Summary of Methods

`buildList listed listOrder show showList showListEmpty showListPrefix showListSuffix`

Properties

(none)

Methods

`buildList (lst)` | `lister.t[100]`

Return a string containing what this lister would display, minus the terminating paragraph break.

`listed (obj)` | `lister.t[84]`

Should 'obj' be listed in this list? Returns true if so, nil if not. By default, we list any object whose 'listed' property is true.

`listOrder (obj)` | `lister.t[92]`

Get an item's sorting order. This returns an integer that gives the relative position in the list; we order the list in ascending order of this value. By default, we return the 'listOrder' property of the object.

`show (lst, paraCnt, paraBrk, =, true)` | `lister.t[39]`

Show a list of objects. 'lst' is the list of objects to show; 'paraCnt' is the number of paragraph-style descriptions that we've already shown as part of this description.

Note that many specific listers replaced the 'paraCnt' parameter with a more useful 'parent' parameter, containing the identity of the object whose contents are being listed.

`showList (lst, pl, paraCnt)` | `english.t[2924]`

Show the list as an 'and' list, that is a list of the aNames of each item in lst formatted with commas between list elements and 'and' between the last two items in the list.

`showListEmpty (paraCnt)` | `lister.t[77]`

no description available

`showListPrefix (lst, pl, paraCnt)` | `lister.t[73]`

add a paragraph break at the end, if it's requested

`showListSuffix (lst, pl, paraCnt)` | `lister.t[75]`

no description available

Adv3Lite Library Reference Manual
Generated on 12/12/2022 from adv3Lite version 1.6