Chapter 17: Activities
17.13. Listing contents of something

1. When it happens. When taking inventory, the list is produced by the activity "listing contents of yourself"; when looking, a list of items which do not deserve their own paragraphs is produced by "listing contents of" the location; when a say "[contents of ...]" is performed. (But note that it doesn't happen when, for instance, "[a list of animals]" is printed, because that isn't a list of the contents of any room or location.)

2. The default behaviour. The list is printed out.

3. Examples. (a) We have already seen that it can be elegant to elaborate on a description in the context of a list. Here we add "discarded" to a sweet wrapper which is found on the ground.

Rule for printing the name of the wrapper while listing contents of a room: say "discarded sweet wrapper".

(b) Lists can be considerably shortened and tidied up if similar items are grouped together. We do this by specifying what should be grouped together before listing contents, using the special phrase "group ... together":

Utensil is a kind of thing. The knife, the fork and the spoon are utensils. Before listing contents: group utensils together as "utensils".

The result will be, say, "two utensils (knife and spoon)", if both are found in the same place.

(c) We can less obtrusively group items together like so:

Before listing contents while taking inventory: group utensils together.

Now they will be rolled into a single inventory line: say, "fork and spoon" rather than "two utensils (fork and spoon)". Note that no articles will be given - that is, Inform will not say "a fork and a spoon". To restore the articles, use "group utensils together giving articles".


325
* Example  Unpeeled
Calling an onion "a single yellow onion" when (and only when) it is being listed as the sole content of a room or container.

RB


PreviousContentsNext